I guess I'm confused, why is that expression being evaluated before printing then. This code is in Section Expert in the formula section next to Suppress. All's I want it to do is "Only" evaluate when printing. That way the section will be suppressed and not show up while printing.... Right now, it is ignoring WhilePrintingRecords and evaulating prior to printing.. Maybe section expert doesn't recognize this command?
Main Topics
Browse All Topics





by: dougvargaPosted on 2009-02-06 at 12:20:42ID: 23573814
WhilePrintingRecords doens't actually effect what gets 'printed'. "PrintingRecords" is a pass in the crystal reports record evaluation process. Basically, Records get Read into memory and then Printed to the report canvas. Crystal allows the developer to specify if a formula should be evaluated before records get read, while they are read, or while they are printed to the report canvas.
So, if someone is viewing a section on the screen, it is going to get printed. There isn't a way to distinguish via parameter as you are trying to do above.
In your formula, the {?PrintTotals} is controlling what is displayed becuase it is the last statement evaluated in the formula.