0
votes

I have created four database fields: ChargesView, CommodityView GeneralInfoView and LumpsumView

So I want ChargesView with header and its details, CommodityView with header and its details.

Ex: I want crystal reports to be like:

Report Header
Page Header
Details
Pageheader
Details
Report Footer
Page Footer

2

2 Answers

0
votes

Use subreports for the Details section

Write a subreport for ChargesView's Details section. Write another subreport for CommodityView's Details section. Place these subreports into separate Details sections for your main report, and activate New Page After for both sections.


If you need the Page Header to change based on which subreport is being displayed, you can make multiple Page Headers and suppress them based on a shared variable. (When your ChargesView section displays, set the shared variable to charges. Then have the Charges header only display when your variable is equal to `charges.)

0
votes

As far as I know, you can't insert a PageHeader between 2 Details.

In this case, you have to use sub-reports.

Right click on DetailSection > Insert Sub-report > Choose an preexisting report or create a new one.

A subreport is a report item that displays another report inside the body of a main report.