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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

suppress the group when all the details are null or empty

Status
Not open for further replies.

codrutza

Technical User
Mar 31, 2002
357
IE
CRXI
I have a group and in detail I have some formulas that if they are null or empty are suppressed.

A
Date1 carrier1
B
C
carrier2
D
E
F
Date5 carrier5 job5

Is a way to suppress the group when all the details are null or empty?

A
Date1 carrier1
C
carrier2
F
Date5 carrier5 job5

Thanks
 
You can use either the Group Selection Expert or the Suppression formula on the the group sections. Your formula for these would be something like:

IsNull({@DateFormula}) and
(IsNull({@CarrierFormula}) or {@CarrierFormula} = '') and
(IsNull({@JobFormula}) or {@JobFormula} = '')

How this will actually look depends on what the types and results of your formulas are.

-Dell

DecisionFirst Technologies - Six-time SAP BusinessObjects Solution Partner of the Year
 
Oh, and if you use the Group selection, you'll need to wrap the whole thing in parentheses and put "Not" in front of it.

-Dell

DecisionFirst Technologies - Six-time SAP BusinessObjects Solution Partner of the Year
 
How are you suppressing the unwanted values? If you're selecting those details and then suppressing them when it comes to printing, you need to move the selection to record selection.

[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 2008 with SQL and Windows XP [yinyang]
 

Madawc Williams
Sorry. I'm not suppressing the formulas, they "don't appear" when the result is null or empty.
Dell
Sorry. The formulas not( IsNull({@DateFormula}) and
(IsNull({@CarrierFormula}) or {@CarrierFormula} = '') and
(IsNull({@JobFormula}) or {@JobFormula} = '')) are for detail, not for group, isn’t it? How can I hide the group when the results in detail are null or empty?
 
It depends on how many records you expect to see in your groups. If there is only one, it would work. If there's potentially more than one, you could try using Max on the formulas, something like this:

not( IsNull(max({@DateFormula}, {Group Field})) and
(IsNull(max({@CarrierFormula}, {Group Field})) or max({@CarrierFormula}, {Group Field}) = '') and
(IsNull(max({@JobFormula}, {Group Field})) or max({@JobFormula}, {Group Field}) = ''))

-Dell



DecisionFirst Technologies - Six-time SAP BusinessObjects Solution Partner of the Year
 
God ideea, Dell, thank you. I tried it and it works. But now I have a subgroup, and I have some formulas in the subgroup as well; when I right click on them, it doesn't give me the summary option. Any idea?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top