0
votes

my problem is:

the report force me to have a page header section which contains 4 fields. but the problem is one of this fields ( for example f1) should be hides in pages of first detail section and shows in some other detail sections.

for example suppose first detail section(or sub report as I use in my project) needs d1 pages and second detail section ( or sub report as I use in my project ) needs d2 pages, for now: the p1 field should be hide in first d1 page headers and be shown in next d2 page headers

the key point is to decide based on sections properties like names or ... but there is no such a parameter in crystal reports formula workshop

how should I to solve this problem I'm working with crystal reports 13.

1
Could you clarify what you're trying to accomplish? Are you wanting the first version of the page header to display with the first records of each group, and a different version with the subsequent pages? Then on a new group, print the first version again, then the rest? If so, do you start a new page at the end of each group?paulmelnikow

1 Answers

0
votes

Probably you can use combination of formulas, which all should be evaluated at printing time (WhilePrintingReocrds(); function as first line of the formula).

On top of the d1 section and at bottom of the d2 section you place invisible formula, which sets some public variable, like:

WhilePrintingReocrds();
BooleanVar show_header_f1 := true;
''

(Probably you need use same formula in report header too.) On top of the d2 section and at bottom of the d1 section you place another invisible formula, which clears same variable:

WhilePrintingReocrds();
BooleanVar show_header_f1 := false;
''

In suppress formula for header field f1 you write next function:

WhilePrintingReocrds();
Not BooleanVar show_header_f1

There can be syntax errors, but I hope you get the idea. Probably you need to play with location of these formulas to create requested behavior.