Search code examples
crystal-reportscrystal-reports-2008crystal-reports-2010

Crystal Report page height runtime setup


I want to create a report for "Order print" and this report will be printed on a roll printer, this mean that the page height of the report depends on the number of rows which are created dynamically.

Width of the page is 8 c.m. and height should be based on number of rows in detail. Sometimes report print area is 5c.m. sometimes it is 20 c.m. or any other measurement.

I want to know how to configure the "Page Setup" to change the height of the crystal report dynamically.

Please help to solve the issue.


Solution

  • I think this solution can be useful:

    • Set your header information in the Report Header section.
    • Don't use Page Header section.
    • Set your footer information in the Report Footer section.
    • Don't use Page Footer section.
    • Set margins of top and bottom of page to minimum and if it's possible set them to 0.

    With this solution you will have a report like this:

    +------------------+    \ 
    |  Header Section  |    | 
    +------------------+    | Page 1
    | Detail row 1     |    |
    | Detail row 2     |    |
    | Detail row 3     |    / ------
    | Detail row 4     |    \
    | Detail row 5     |    |
    | Detail row 6     |    | Page 2
    | Detail row 7     |    |
    | Detail row 8     |    |
    | Detail row 9     |    / ------
    | Detail row 10    |    \
    | Detail row 11    |    |
    : Detail row ...   :
    | Detail row last  |    | Last Page
    +------------------+    |
    |  Footer Section  |    |
    +------------------+    /