Set size of detail section in Crystal Report

crystal-reports

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 report view is full page that is k ..but if i have 2 records in details sections, then whole page footer section getting stick to details page..so whole alignment is getting change

so is there any way to set details section fixed i.e. for 10 records and if records exceed more, then all records on same page and remaining data will go on next page i.e report footer,page footer.

Is there any setting in crystal report

Best Answer

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.

Related Topic