Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
raghavendra_hullur
Active Contributor

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:

  • Create a formula say “fr_txt_dyn_suppress” and      include formula content provided below

                        Whileprintingrecords;

                        Global booleanvar flag1:= true;

  • Insert this formula on all the report footer sections      in which selection criteria fields are included and suppress the field by      right clicking and navigating in the path Format Field -> Common and      check the “Suppress” checkbox.
  • Now, right click on the page header section which needs      to be suppressed on selection criteria page and navigate to Section Expert      - > Common and modify the formula content against “Suppress (No      Drill-Down)” field by clicking on X+2 button and include below code

                         Global booleanvar flag1;

                         If flag1 = true then true;

  • The above formula is to suppress the page header      section when it finds any section which has flag1 set as true. In this      case, we have flag1 set to true in report footer section which has      selection criteria fields.
2 Comments
Labels in this area