Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Headers in Detail Section Not Repeated on Page Change

Status
Not open for further replies.

mwake

Programmer
Feb 12, 2004
151
US
I'm using CR2008 with an Oracle 11g database as my data source. I've been hired to fix some bugs in existing sales compensation reports and I'm having a problem with the Comp Statement report. It has a one group(participantseq)but contains 33 detail sections. The first 11 detail sections are actually headers for various sections of the report, and they are conditionally suppressed depending on if any data exists for that section. Here is an example of the suppression formula:

Global BooleanVar gbSectionFShown;

if ({COMPSTATEMENT.PARTICIPANTSEQ} <> previous({COMPSTATEMENT.PARTICIPANTSEQ})) or {COMPSTATEMENT.POSITIONSEQ} <> previous({COMPSTATEMENT.POSITIONSEQ}) then (
gbSectionFShown := False;
);


if ({COMPSTATEMENT.OBJNAME} = "Current Period Earnings") and gbSectionFShown = False then (
gbSectionFShown := True;
False;
) else (
True;
);

The COMPSTATEMENT.OBJNAME changes for each "header" detail section, otherwise they are the same. My problem is that the "headers" do not appear if the data from that section continues to the next page. Is there any way to alter the suppression formula to also appear if the data for that section continues to the next page??
 
You can not repeat details on new page.

I would try adding a new group at a granualr level which replicates the detail. In options you can then check repeat on new page. Split this into 33 sections and replicate suppression and then suppress detail section.

Caveate - using Previous() over page breaks may have some problems, not sure as never tried this approach. You might have to use variables to capture previous value for comparison purposes, but dont forget to reset it in this new group footer.

Good luck

Ian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top