简体   繁体   中英

how to make dynamic page header in crystal reports

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM