0
votes

Why do certain columns of a sub report not suppress with the same code put in some other columns. The other columns suppress successfully, just the header does not suppress.

I have already tried suppressing within the sub report. When I try to suppress the entire sub report section, the entire report does not show any data.

If isNull({CTA_Detail_3.PROJECT_NUM}) THEN TRUE
Else If 
    totext({CTA_Detail_3.PROJECT_NUM}) <> totext({?Pm-CTA_Head.PROJECT_NUM}) OR
    totext({CTA_Detail_3.PROJECT_PURPOSE}) <> totext({?Pm-CTA_Head.PROJECT_PURPOSE}) OR
    totext({CTA_Detail_3.PROJECT_TIRE_NO}) <> totext({?Pm-CTA_Head.PROJECT_TIRE_NO}) OR
    totext({CTA_Detail_3.EXAM_DATE_CUT}) <> totext({?Pm-CTA_Head.EXAM_DATE_CUT}) Then TRUE

The sub report should not show up if CTA_DETAIL_3.PROJECT_NUM is NULL

1

1 Answers

0
votes

Try placing the fields being evaluated in your suppress formula within the sections where they are not working as expected. The problem is most likely that they do not yet contain the values necessary for the formula to evaluate to True.

In the first line of the formula you provided, you are testing for a NULL value. It could be parsing this field as an empty string instead of a NULL, so you may want to test for that condition as well by modifying the formula as follows:

If isNull({CTA_Detail_3.PROJECT_NUM}) Or {CTA_Detail_3.PROJECT_NUM} = "" THEN TRUE

I try to be in the habit of always testing for null values by also testing for empty strings as this helps ensure both scenarios are handled by the formula.