Set size of detail section in Crystal Report

前端 未结 3 1517
南笙
南笙 2021-01-15 21:37

I m generating Bill report using crystal report in VS2008..in that, details section size is dynamic. i.e. depend on number of records, it changes. so if I\'ve 10 records the

相关标签:
3条回答
  • 2021-01-15 22:00

    Ok, i can give you some tips on how you can approach your desired outcome.

    The Crystal Reports engine has the following characteristics.

    1. The Report Header appears on the top side of the first page only.
    2. The Page Header appears on the top side of every page (on the first page it is under the Report Header).
    3. The Report Footer appears only once, on the bottom side of the detail section on the last page.
    4. The Page Footer appears on the bottom side of every page.

    There is a capability in every section that allows you to suppress it if you don't need it. It can be done by right clicking the bar of the section that you want to suppress and pressing the suppress choice from the menu that will appear.

    Consider the 2 following cases.

    enter image description here enter image description here

    If you want to achieve the first case, change the height of the Page Footer to a value that will allow only 10 records to show on the Details section, include all the footer information in the Page Footer and suppress the Report Footer. If you want the same result but with the footer information appearing only on the last page, right click the bar of the Page Footer and select Section Expert. From there, press the x+2 sign next to the Suppress CheckBox and add the following code there.

    if pagenumber <> totalpagecount then
        true
    else
        false
    

    If you want to achieve the second case, change the height of the Page Footer to a value which will allow only 10 records to show on the Details section and include all the footer information in the Report Footer section.

    In both cases the Report Header is suppressed.

    0 讨论(0)
  • 2021-01-15 22:05

    Go to Section Expert select report footer Tick the Print at bottom page and Keep together option

    Problem will be solved

    0 讨论(0)
  • 2021-01-15 22:05

    First of all fix height detail section by right click on detail section Detail Section->Section Expert click on paging Tab->Check in New Page Before checkbox and beside it (x+2)button write formula-> (Suppose you want 8 rows to display in your report per page and additional rows(9th row,10th row and so on... to another page) IF Remainder (RecordNumber, 9) = 0 THEN TRUE ELSE FALSE so now your height is fixed.. and for blank rows suppose 2 records/rows are coming from data table/data source then from 8 fixed rows , 6 rows should be blank rows for that.. design your detail section with fields and keep report footer(section 4) blank with with some spaces(i want 8 rows fixed so keep size of 8 rows blank assuming in report footer) and put footer details in your section 5(page footer)..

    if your header or footer is not visible on another page then put all header parts details in page header and footer details in page footer

    :)

    0 讨论(0)
提交回复
热议问题