Skip to Content
0
Former Member
Jan 12, 2011 at 12:08 PM

Crystal Reports XI - Suppression Formula

314 Views

I am trying to suppress different sections based on fields in my report. I have checked that the formulas are working by placing them in the report and have checked that they are returning the correct boolean result. I have three sections using the forumulas below;

Section A

If pagenumber MOD 2 = 0 then true
else
If {Student__02_03_.Date of Birth}<>DateTime(1900,1,1,0,0,0) and {Student__02_03_.Ethnicity}<>"99" then
    FALSE
else
    TRUE

Section B

If pagenumber MOD 2 = 0 then true
else
If ({Student__02_03_.Date of Birth}=DateTime(1900,1,1,0,0,0) and {Student__02_03_.Ethnicity}<>"99") then 
    FALSE //If either date of birth & ethnicity are blank or unknown then show this header
else
If ({Student__02_03_.Date of Birth}<>DateTime(1900,1,1,0,0,0) and {Student__02_03_.Ethnicity}="99") then 
    FALSE //If either date of birth & ethnicity are blank or unknown then show this header
else
    TRUE // if not then supress

Section C

If pagenumber MOD 2 = 0 then true
else
If ({Student__02_03_.Date of Birth}=DateTime(1900,1,1,0,0,0) and {Student__02_03_.Ethnicity}="99") then 
    FALSE //If both date of birth & ethnicity are blank or unknown then show this header
else
    TRUE // if not then supress

For my first result in the report this always returns the correct section. However, from the second result on it hides all of the sections, despite showing the correct result in CR (they show FALSE, TRUE, TRUE for each record in my current result. But the first section does not display.

If I remove the suppression formula it works fine through the report, but unfortunately this does not help me! Can anyone offer any suggestions?

Edited by: cataylor951 on Jan 12, 2011 12:08 PM