Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can't suppress a group footer when data is null

Status
Not open for further replies.

dbrew0

Technical User
Dec 15, 2003
38
US
I've got a report in CR 9. In it I've got 3 nested groups. In my data, sometimes there's no string data to be displayed in the 3rd group's name, but there's other data that's needed for other parts of the report.

My problem is that I can't get that group footer to suppress when there's nothing for the group footer name to display. I've got a conditional suppress formula that looks like this:

Code:
if (GroupName ({Job.Drawing})<>"" and DrillDownGroupLevel<>2) or (GroupName ({Job_Operation.Operation_Service})="") then
 true
else
 false

The first part of the IF statement works just as expected. However the last part (after the OR) which I just recently added, doesn't suppress the footer when the group name is null. I've also tried to remove the first part and just have the part after the OR as the only condition with the same results - footer won't suppress. Any ideas?

Thanks,
Dan
 
First, I have never found an occasion to use the groupname field. Just use the field you are grouping on in the formula, as in:

(
{Job.Drawing}<> "" and
DrillDownGroupLevel <>2
) or
{Job_Operation.Operation_Service} = ""

Since you are working with two fields here, one each from two different groups, you should tell us which group is which (by number), and which group section you are trying to suppress. You probably need to use a summary field for one of them--otherwise the value will only be the last one in the particular group that is nested within the outer group.

-LB
 
Thanks for the reply and tidbit of info.

This conditional suppression formula is on group 3 footer. Job.Drawing is the field used for group 2. Job_Operation.Operation_Service is the field used for group 3.

In the data source, there are times where the Job.Drawing field is blank (not all jobs have a drawing associated with it). 99% of the time there is string data in the Job_Operation.Operation_Service field. However, whenever there isn't, I'm trying to suppress that footer from being shown.

The initial part of the formula is supposed to look at whether there is a drawing number in the record, and if the drilldown level doesn't equal 2 it should suppress the group footer 3. This parts works just fine and consistant. However, whenever I try to use the last part ({Job_Operation.Operation_Service})=""), the formula doesn't suppress the footer. Even if I remove the first part of the formula and leave only the {Job_Operation.Operation_Service}="" as the condition, the footer never gets suppressed. I see a blank line on the report that corresponds to this blank data.

Dan
 
LB,

I don't know if this is final answer, or I just got lucky. After I posted the above message, I got to thinking about NULL values and went and checked my report options. The Convert Database NULL values to Default was unchecked. When I checked it and re-ran the report, the blank line was then suppressed as it should.

Now my follow up question is (which will show my novice to CR), should I always have the db NULL conversion to default checked? I thought CR9 would understand NULL values. Or does it depend on what type of db and connector that's being used? I'm using an ODBC connector to an Access db.

Thanks,
Dan
 
I think most people DON'T check convert null values to default for various reasons. You could have achieved the same result by changing your formula to:

(
isnull({Job_Operation.Operation_Service}) or
trim({Job_Operation.Operation_Service}) = ""
) or
(
(
not isnull({Job.Drawing}) or
trim({Job.Drawing}) <> ""
) and
DrillDownGroupLevel <>2
)

Note that ordinarily, null checks should be first in the formula.

-LB
 
Thanks LB! That works very well! All is running well - for a Tuesday LOL.

Thanks again!
Dan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top