Question : Print 'Incomplete' for crystal report subtotal if any detail records are zero

I'm using Visual Studio 2008.  I need to print “Incomplete” for a crystal report subtotal if any of the detail records are zero.  Zero means the value has not been entered yet, and I want the subtotal to read “Incomplete” if any of the detail records are zero.

I know how to overlay and control two fields (one with a number and other “Incomplete”), and suppressing one field on a flag.

I just need to know how to set a 'hasZero' flag at the detail level, access it for the subtotal formula, and how to reset after the subtotal.

Answer : Print 'Incomplete' for crystal report subtotal if any detail records are zero

In your group header you can place a formula which resets the flag =>
Global booleanvar varIncomplete;
varIncomplete := False;

Then on your detail section you can create a formula that sets the flag value, you will need to play with it but something like =>
WhileReadingRecords;
Global booleanvar varIncomplete;
if yourfieldnamehere = 0 then
varIncomplete := True


Then your suppress formula for your subtotal or incomplete would be something like =>
your subtotal   =>   varIncomplete = True   or just varIncomplete
your incomplete =>  varIncomplete  = False   or just Not varIncomplete
Random Solutions  
 
programming4us programming4us