Very long report works in HTML Preview, but not Preview

15 posts, 0 answers
  1. Chris @ Intrinsic
    Chris @ Intrinsic avatar
    98 posts
    Member since:
    Oct 2010

    Posted 07 Sep 2011 Link to this post

    Hi,

    How would I properly format a very long report (one record spans multiple pages, with one section containing a table with multiple records) to work both in Preview and HTML Preview?  I got it to work in HTML Preview, but I don't think I'm creating the report correctly.  Only the middle portion of the report shows up in Preview Mode and in the PDF when I export it from the report viewer.  The report is definitely bigger than the allowed page size.  Also,  I have one section of the report that I should keep in the detail section, as it is multiple records.  It will work fine as far as HTML Preview (it formats correctly in my web application.)

    Thanks you.
  2. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 08 Sep 2011 Link to this post

    Hi Chris,

    We're not sure we understand your inquiry and our suspicion from the provided information so far is that you probably do not consider the differences between logical (HTML Preview and web report viewer) and page oriented formats (Preview and PDF format).

    The output of a report rendered in HTML and PDF differs because both medias are quite different. The 1st (HTML) is dedicated to displaying information on screen and the page is infinite by width and height; in contrast the 2nd format - PDF - supports physical pages and is meant not only for reading on screen but for printing.

    According to whether the format supports physical pages, we separate the export formats on two groups: page-oriented (PDF, Image (print preview), print, XPS, RTF) and non-page oriented (HTML/MHTML, Excel, CSV).

    For the page-oriented formats the content layout is on horizontal and vertical pages according the the page settings of the report, while for the rest of the formats take into considerations other characteristics of the media like the grid of the Excel worksheet.

    For detailed information about specific rendering extension/format please refer to Design Considerations for Report Rendering help section in our documentation.

    All the best,
    Steve
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

  3. DevCraft banner
  4. Chris @ Intrinsic
    Chris @ Intrinsic avatar
    98 posts
    Member since:
    Oct 2010

    Posted 08 Sep 2011 Link to this post

    Ok.  My point is that I've created the report bigger than the allowed page size, which is probably not correct.  But, how would i create the report so that all my fields (100 or more), get split up into multiple pages properly?  Or is that possible in telerik reporting.  All fields except for one table have only ONE record.

    Example:

    field 1  field 2 field 3
    ..
    ..
    ..
    ..
    Table 1
    record1
    record2
    record3
    ..
    ..
    *****  MAXIMUM Page size ends here  *******
    field 99 field 100 field101
    field 102 field 103
    ...
    ..
    ..
    field 125 field 126 field 127


  5. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 12 Sep 2011 Link to this post

    Hi Chris,

    The Table item being a single item would not be paged/separated in HTML rendering. This information is available in the Design Considerations for HTML Rendering help article i.e.: Due to the fact that HTML is not a page oriented format, all report items placed in a single section are rendered in a single page i.e. KeepTogether property is ignored.

    So in this case, there is no way to force the web report viewer to page the report. What you can do is export to PDF directly and show it in the browser instead of using the web report viewer. The following KB contains the information how to do this (Exporting a report to PDF programmatically)
    and if you want to skip the part where it ask you to open or save the PDF, simply remove the Response.AddHeader line from the code.

    Best wishes,
    Steve
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

  6. Chris @ Intrinsic
    Chris @ Intrinsic avatar
    98 posts
    Member since:
    Oct 2010

    Posted 12 Sep 2011 Link to this post

    Ok, I see what you mean.  But, are you saying I should move my stand alone textboxes into tables for everything, and put it in the detail area?  then, it should automatically paginate the report when exporting to PDF correct?  And, to solve my alignment issues, putting everything in tables would automatically align everything.  The only down side would be that I would have to assign the same dataset 11 times to each individual table.  that may slow down the report?
  7. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 13 Sep 2011 Link to this post

    Hello Chris,

    What I'm referring to is that you cannot get a 1:1 looking report both in HTML rendering (web report viewer) and PDF rendering. Using TextBoxes instead of Table items would allow the report to be logically paged based on the set of records occupying a page. The same is not applicable for the Table item, as it would grow to fit all records, but it remains a single item and thus as explained in previous post - would be rendered as a single page.

    Kind regards,
    Steve
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  8. Chris @ Intrinsic
    Chris @ Intrinsic avatar
    98 posts
    Member since:
    Oct 2010

    Posted 13 Sep 2011 Link to this post

    You don't understand my question.  there is no multiple records, I've repeated that many times on  my questions.  It's ONE record, except for the one set of records for a separate datatable, (most likely only 5 records max.)   so, the ONE record goes well beyond the page limit.  So, there is no way to paginate it all then?
  9. Chris @ Intrinsic
    Chris @ Intrinsic avatar
    98 posts
    Member since:
    Oct 2010

    Posted 15 Sep 2011 Link to this post

    Also, there is one major problem using webservices with Telerik Reporting:

    If you have a table object (that is the only way I can get it to align with multiple fields vertically as well as horizontally.),  you have to bind EACH and every table object to the datasource, as well as the report itself (if you have fields in the page header, or footer, etc.) so, it becomes very inefficient!  What if you have 11 tables like I do?  That's 11 duplicate records or datatables.  To see what I mean, create a report with a table, and with fields in the page header.  Now, at run time, bind the report to the report viewer, and bind the datasource to the report, and there will be NO data in the table.  Now, you can see that you have duplicate data in the report, as you have to bind both the report, and each table to the same datatable.

  10. Chris @ Intrinsic
    Chris @ Intrinsic avatar
    98 posts
    Member since:
    Oct 2010

    Posted 15 Sep 2011 Link to this post

    Running into more problems.  Now, the preview mode shows over one hundred pages?!  But, there is only one page of the report, as there is only one record.  I tried moving all my sections into tables, but that doesn't work either.
  11. Chris @ Intrinsic
    Chris @ Intrinsic avatar
    98 posts
    Member since:
    Oct 2010

    Posted 16 Sep 2011 Link to this post

    Please let me know the solution to this.  I have a very long report.  Maybe telerik reporting cant handle it?  What should I use?  Maybe just an aspx page with all the fields...  Is there something I can use to print the page, and have it auto-paginate?

    I tried moving all 11 tables into the detail section, and then assign the datasource separately to each table, but that produces a 100+ page report with only 2 or 3 rows on each page! 



  12. Peter
    Admin
    Peter avatar
    1611 posts

    Posted 16 Sep 2011 Link to this post

    Hi Chris,

    Do you experience any troubles with blank pages? Generally blank pages are caused by report items that carry over the next page. In order to see which items/sections are causing the problem, simply change their background to a different, more contrasting color and export it to PDF. The rendered report will immediately give you a clue about the items which are at fault.

    Generally there are several cases when an empty page may occur:

    • The report detail section is a repeater and the detail section will be represented with one instance per every Report.DataSource record. Thus if you have unused detail section our suggestion is to set it's Visibility to False;
    • Report Width is greater than the available page space (Page Width - Left Margin - Right Margin);
    • There is a report item with boundaries going out to the right from its parent section.

    For additional information check out the Problem: Telerik Reporting renders blank pages KB article.

    Do you still experience the no data troubles and what do you mean by run-time binding? Do you use events, bindings or you set the data source from your application? If you still experience any issues please elaborate further.

    About the Table layout without a Table item, please check out Dynamic Layout (Dock and Anchor) help article that elaborates on the topic.

    Kind regards,
    Peter
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  13. Chris @ Intrinsic
    Chris @ Intrinsic avatar
    98 posts
    Member since:
    Oct 2010

    Posted 26 Sep 2011 Link to this post

    I resolved this issue a while ago, so this might help others in the same situation:

    my report is approximately 3 pages long (in Preview mode, Landscape).  My report has almost 100 fields, which are divided into 11 sections for readability.  Each section is a table object.  There is one section that has multiple records, but all other sections have only one record.  I used tables for alignment purposes, as no matter what I tried, I couldn't align textboxes vertically and horizontally, depending on what data was in each field.  I also had to bind the same datatable 10 times to each table object in the report (and the 11th table, I bound to the datatable with  multiple records), which seems very inefficient.  but, it only takes 3 seconds to launch the report so, it doesn't affect performance too much.  also, once I converted the entire report to use tables, the pagination worked perfectly.  On the HTML Preview, the report was very long (which was expected), but after exporting to PDF, it came out to 3 pages, and formatted correctly. 
  14. Chris @ Intrinsic
    Chris @ Intrinsic avatar
    98 posts
    Member since:
    Oct 2010

    Posted 30 Sep 2011 Link to this post

    I spoke too soon.  when i actually print the report the fonts are very tiny.  when I open the PDF, the PDF looks ok, but when it prints the fonts are very small.  Any idea what could cause this?
  15. Peter
    Admin
    Peter avatar
    1611 posts

    Posted 03 Oct 2011 Link to this post

    Hello Chris,

    The true print functionality of the Web Report Viewer and Silverlight Report Viewer depends on the Adobe PDF plug-in. Thus the result should be the same as of the exported to PDF report. Still we do have some suggestions/questions:
    • What are the report's page settings?
    • What page scaling is applied in the Adobe print dialog prior to printing?
    • Do you experience the same behavior when printing the exported PDF report?

    Greetings,
    Peter
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  16. harsh
    harsh avatar
    2 posts
    Member since:
    Feb 2016

    Posted 08 Feb Link to this post

    In landscape mode for report  their is a table which contain more than 50 column and the table is used in list for repeating table . But the problem is when i increase width of table more than page size as their are many column for readability of user ,in interactive view all table are shown properly but in print preview some of table are not visible when they are paginated and while printing also they are not visible .pls reply asap .
Back to Top
DevCraft banner