Crystal Reports version:
2008
Background:
In Crystal, as we know, there are mainly 5 sections viz. report header, page header, detail section, report footer and page footer. The data fields and labels included in page header and page footer sections will be displayed on all pages of the report; likewise the fields used in report header and report footer sections will be displayed only on first and last pages of the report. Normally the selection criteria information used for a report will be displayed at the end of the report.
Sample Screenshots:
1) Screenshot with page header and detail section
2) Screenshot with report footer section
Scenario:
Suppose we have 20 pages of output including selection criteria (which is displayed at the end of the report via report footer section i.e. after detail section data is displayed). Say 15 pages of detail section data and 5 pages of selection criteria data is there. Now the requirement is such that we need to display the page header section data only on pages where detail section data is getting displayed and the same needs to be suppressed on pages where selection criteria is displayed (in this case, it’s from page 16 to 20, but this will be dynamic in real scenario). Please check the above screenshots for sample example.
Approach:
To achieve this, we need to follow the steps as below:
Whileprintingrecords;
Global booleanvar flag1:= true;
Global booleanvar flag1;
If flag1 = true then true;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
11 | |
9 | |
7 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 | |
3 |