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

Suppress Group Header if Group Footer Balance is zero

Status
Not open for further replies.

mgallot

MIS
Jan 22, 2001
93
US
Using Crystal 2008 to report on Balance Due. There are 6 groups, and there is a Balance Due calculated in the Detail section as well as in each group footer. If the Balance Due for the group footer is 0, then I would like to suppress the Group Header. Is there a good way to do this?

@Balance Due formula adds 4 running totals in each of the footer sections.
 
Can you conditionally suppress the group header using @BalanceDue = 0? for each group?
 
It would help if you showed the contents of any formulas you are using.

but...can you insert a summary of the balance due at the group level?

Sum({table.BALAMOUNT}, {table.ID})

if so you could use it in the suppress criteria in the section expert.
Sum({table.BALAMOUNT}, {table.ID})=0

 
This report calculates the Balance Due for each bill and here is the formula thats in the detail section.

@Balance Due
whileprintingrecords;
Sum ({@Billed Amount}, {ClientAssignmentBilling.Bill Number}) +
Sum ({@CashReceiptsAmt}, {ClientAssignmentBilling.Bill Number}) +
Sum ({@Write Off Amount}, {ClientAssignmentBilling.Bill Number}) +
Sum ({@Reapplication Amount}, {ClientAssignmentBilling.Bill Number})

To get group totals, I instead added running totals for each of the amount formulas above and add them up for each group total.

@Balance Due Total 6
{#Billed Total 6} +{#Reapp Total 6} +{#WO Total 6}+{#Cash Rcpt Total 6}

I will try to get a group sum .
 
So in this report the user is given a choice of 10 different fields to group on for groups 1-6. Then thare are a few hidden groups. In order to use the sum formula and check it in the Group Header, there needs to be a group created for all of the choices, and then a total for each group needs to be checked. I can try this... is there a better way?
 
The group header still doesnt suppress when I add this to the section expert.

@Balance Due Group 6 = 0
 
Running Totals effectively while printing objects. Consequently your suppression formula does not have a value at that time as footers are printed after headers.

You can only suppress headers using normal summaries.

If you can come up with a suppression formula using Balance Due then that should work

@Balance Due
//whileprintingrecords; you will probably need to remove this too
Sum ({@Billed Amount}, {ClientAssignmentBilling.Bill Number}) +
Sum ({@CashReceiptsAmt}, {ClientAssignmentBilling.Bill Number}) +
Sum ({@Write Off Amount}, {ClientAssignmentBilling.Bill Number}) +
Sum ({@Reapplication Amount}, {ClientAssignmentBilling.Bill Number})

Ian
 
Have you tried adding an If Condition?
Like:
Note incorporate that to your formula and use your @Balace Due (I Think you should rename your formula @BalanceDue)
This works with Basic Sintax.

If @BalanceDue <> 0 then
formula = False ' False Doesn't Supress the section
Else
formula = True ' True Supresses the section

End If

It is like Checking and Unchecking the Supress (No Drilldown checkbox)

Regards
[smile]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top