PDF support

15 posts, 0 answers
  1. Ariel Kahana
    Ariel Kahana avatar
    4 posts
    Member since:
    Oct 2005

    Posted 26 Nov 2006 Link to this post

    Hi.
    I have some questions reguarding the Reporting tool:
    1. When the PDF Extension will be available.
    2. I want to use the tool to produce labels. what is the preferred report render extention for that kind of task.  
  2. Rossen Hristov
    Admin
    Rossen Hristov avatar
    2478 posts

    Posted 27 Nov 2006 Link to this post

    Thank you for your interest in our reporting tool. Ariel.

    1. The PDF rendering extension will be available in the first official version, which is due next year. Unfortunately, we do not have a timeframe for it yet, but we hope to have a beta in late January.
    2. In order to achieve the best results when producing labels, you must use the WinForms viewer. You can directly print the report from the viewer, or if you want to store the report for later use, you can export it to PDF or TIFF and print it later. The PDF and TIFF image formats are page-oriented formats. As a result, you can set properties to precisely control how pages will look when viewed in PDF or TIFF formats. That makes this formats more suitable for printing on paper.

    Sincerely yours,
    Rossen
    the telerik team
  3. DevCraft banner
  4. Todd Anglin
    Todd Anglin avatar
    2040 posts
    Member since:
    Aug 2005

    Posted 27 Nov 2006 Link to this post

    Rossen,

    Can you clarify why the WinForms viewer would have to be used to print labels? Is there going to be a limitation in the Web viewer that will not allow reports to be displayed consistently between the web and Windows?

    I know that multi-column layouts don't display correctly on the Web in the November CTP, but I expected this would be fixed in later builds. Either way, can you clarify your comment?

    Thanks~
  5. Ariel Kahana
    Ariel Kahana avatar
    4 posts
    Member since:
    Oct 2005

    Posted 28 Nov 2006 Link to this post

    Hi,
    Is there any bulid in report which support Avery 5160 standard labels, or instructions how to build report which support that standard.     
  6. Rossen Hristov
    Admin
    Rossen Hristov avatar
    2478 posts

    Posted 28 Nov 2006 Link to this post

    Hi Todd,

    The problem is not connected with the fact that the WebViewer does not support multiple columns. Have in mind that this is just a CTP release and there are many features still missing. We are planning to support multiple columns in a later version. The problem is that HTML is not page-oriented format, therefore we do not recommend printing directly from the web page. You still can do that if the results satisfy you. We simply suggested using the WinViewer for better results. The HTML rendering extension does not use physical pages with dimensions in the same way the image rendering extension does. It is designed primarily for viewing reports. Besides, we cannot rely on the web browser's print function and expect the same results across different browsers. Therefore, if the end goal is to get a printed page, I would suggest using the PDF or TIFF exports. You will be able to export to these formats from both the WinViewer and the WebViewer.

    Ariel,

    This is still just a CTP version and there are no wizards for creating different kinds of reports. We are planning to provide such wizards at a later stage. For now you can try to configure the report manually by setting PageSize, Margins, ColumnCount, and ColumnSpacing following the labels' specification.
     

    Greetings,
    Rossen
    the telerik team
  7. Todd Anglin
    Todd Anglin avatar
    2040 posts
    Member since:
    Aug 2005

    Posted 28 Nov 2006 Link to this post

    Rossen,

    Thanks for the clarification. I thought that may have been what you meant, but I just wanted to be sure there wasn't any hidden message in your original comment. That said, I understand and agree that reports that depend on exact page positioning should use a reliable page oriented format like PDF or TIFF.

    In the final version of reporting, will there be API access that allows developers to open a report on the web in its PDF rendered form? In other words, rather than sending users to the HTML viewer and asking them to click Export to PDF and then Print, will developers be able to directly call the export method from a page and present the user with the rendered PDF?

    Thanks~
  8. Rossen Hristov
    Admin
    Rossen Hristov avatar
    2478 posts

    Posted 28 Nov 2006 Link to this post

    Yes, Todd, you will be able to do all that in the official version :)


    Kind regards,
    Rossen
    the telerik team
  9. Nick Devore
    Nick Devore avatar
    9 posts
    Member since:
    Mar 2006

    Posted 25 Apr 2007 Link to this post

    Rossen,

    Now that the official version of the reporting piece is out, would you be able to provide the code that would generate this "straight to PDF" view inside of a webform?  This is exactly what I was hoping to do, but I'm not sure how exactly to do this.  Thanks.
  10. Chavdar
    Admin
    Chavdar avatar
    898 posts

    Posted 26 Apr 2007 Link to this post

    Hi all,

    You can use the following code snippet to programmatically export the report into "PDF" format from a Web Site or Web Application project:

    void ExportToPDF(string reportName, Telerik.Reporting.Report reportToExport)  
        {  
            string mimeType = string.Empty;  
            string ext = string.Empty;  
            Encoding encoding = Encoding.Default;  
      
            byte[] reportBytes = Telerik.Reporting.Processing.ReportProcessor.Render(  
                "PDF"  
                , reportToExport  
                , null  
                , out mimeType  
                , out ext  
                , out encoding);  
      
              
            string fileName = reportName + ".pdf";  
      
            Response.Clear();  
            Response.ContentType = mimeType;  
            Response.Cache.SetCacheability(HttpCacheability.Private);  
            Response.Expires = -1;  
            Response.Buffer = false;  
      
            Response.AddHeader("Content-Disposition",  
                               string.Format("{0};FileName=\"{1}\"",  
                                             "attachment",  
                                             fileName));  
      
            Response.OutputStream.Write(reportBytes, 0, reportBytes.Length);          
            Response.End();  
        }  

    For the Web Site you may need to manually specify the folder in which the "PDF" rendering extension is located using this code line:
        Telerik.Reporting.Processing.ReportProcessor.ExtensionDir = HttpContext.Current.Server.MapPath("~/bin");

    Also, make sure that Telerik.Reporting.ImageRendering.dll resides in the Bin folder of the application.

    Hope this helps.
     

    Best wishes,
    Chavdar
    the telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  11. bnye
    bnye avatar
    66 posts
    Member since:
    Sep 2005

    Posted 20 Aug 2007 Link to this post

    This is a nice example.

    As the report is in the byte array. Instead of downloading this you could send it to interfax or other service.

    I have a couple question on the reporting.

    1. Is it possible to set parameters. For example in our case we would only want to show one job order at a time. Can we pass a GUID to the report so that it only pulls one record.

    2. Is it possible to add data to the report depending on data values from the database. For example if a field in the report displays 1 then show "silver pickup", if the field shows "2" then show "green giraffe" or something like that?

    UPDATE: The following thread seems to cover the parameter issue:
    http://www.telerik.com/community/forums/thread/b311D-hkctc.aspx

    Sincerely,

    Ben
  12. Todd Anglin
    Todd Anglin avatar
    2040 posts
    Member since:
    Aug 2005

    Posted 20 Aug 2007 Link to this post

    Ben-

    Some good news. The next version of Telerik Reporting will contain out of the box support for parameters. This new feature will greatly simplify the task of working with reports and parameters. Look for the update in the September timeframe.

    As for the second question, you should be able to use the Report's events to handle conditional tasks like this. Specifically, the Report's ItemDataBound event should give you exactly the type of access you need to conditionally display data based on what the database returns. Check out more on Reporting events here:

    http://www.telerik.com/demos/reporting/Reporting/
    Examples/Events/DefaultCS.aspx

    Let me know if that helps.

    Thanks~
    Todd
  13. Drew Robison
    Drew Robison avatar
    3 posts
    Member since:
    Dec 2006

    Posted 19 Aug 2008 Link to this post

    FYI: I am using the q2 2008 release of Telerik Reporting.

    I have designed a multi-column report as follows:

    1. define a solitary group within the detail section containing
        textboxes for person's name, company's name, address lines 1-3,
       city, state zip (6 lines)

    2. setting ColumnCount=3 and width=3 in. (this should allow the 3 horizontal columns). Page layout = landscape 8.5 x 11

    From the web page, when the user demands the report, I render the report as PDF with code similar to that logged in this thread.

    Yet, the report shows only one column.

    I need to know urgently if there is a way to generate a multi-columnar report
    exported to PDF. If not, I need to set expectations with the client.
  14. Rossen Hristov
    Admin
    Rossen Hristov avatar
    2478 posts

    Posted 20 Aug 2008 Link to this post

    Hi Drew Robison,

    That is very weird. Can you open a support ticket and attach the source code of your report. We would like to examine it in order to see what is going on.

    Kind regards,
    Ross
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  15. Drew Robison
    Drew Robison avatar
    3 posts
    Member since:
    Dec 2006

    Posted 20 Aug 2008 Link to this post

    Ross,

    thanks for your reply. i was able to get multi-columnar reports working.
    The issue was with widths - once I tweaked those, the report shows up great.

    At this point, I would like to know two things:

    1. Can I set a horizontal direction for the column?

     I think you know what I mean. The entries march downwards then to the right. I would like columns to grow sideways then down.

    2. Can the group header stretch across the page?

    In other words, in my example where I'm grouping contact persons by city, I want the city group header to stretch across the page and all contacts within the group to grow horizontally across.

    If these features aren't currently provided, please consider adding them to your wish list for the near future.
  16. Rossen Hristov
    Admin
    Rossen Hristov avatar
    2478 posts

    Posted 21 Aug 2008 Link to this post

    Hello Drew Robison,

    Currently, making columns appear Across-then-Down will not be possible. We have already added a similar request to our list.

    As for the second question, only the PageHeader and PageFooter stretch on the whole page and this is by design.

    Kind regards,
    Ross
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top
DevCraft banner