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

Change report total as per the suppression on detail section

Status
Not open for further replies.

absnet

Technical User
Jun 13, 2013
3
US
hi there,

I have a report where i am displaying transaction details based on account number. Now if the transaction codes asscociated with that account number belongs to 7083 then i need to suppress the account number and all the transaction related to it along with the group header and footer. But along with 7083 transaction, if 9083 transaction is also there, we need to show the detail section and header and footer. and if there are more than one transaction of 7083 and 9083, based on which one is higher, i need to suppress or show the account number and its details. Well i was able to suppress the detail, group header and group footer, but the report total is not matching. This is what i did so far:

Created two different formulas to find the total number of transactions with 7083 n 9083.
if {Transaction Code} = "7083" then
formula = 1
else
formula = 0
end if
if {Transaction Code} = "9083" then
formula = 1
else
formula = 0
end if.

Then sum the above formula and used the below logic to suppress the detail, group header and group footer.
{@sum 7083} > {@sum 9083}

Now when i am doing the report total, the formula that i am using to suppress the detail section, i can't use the opposite of that like:
sum({@9083}) > sum({@7083})

any help regarding this would be greatly appreciated.

thanks
 
I think you're being more complex than is needed. The formula could be:
Code:
if {Transaction Code} = "7083" then 1
else 0

Likewise for 9083. Use the authomatic totals to get totals at group level. Then compare these totals, as you are already doing.

You don't say what report totals you are after. Getting the overall totals of 7083s and 9083s is easy. If you want the number of groups one exceeding the other, you will probably need to create a field with a variable at group footer level.

If you're not already familiar with Crystal's automated totals, see FAQ767-6524.

[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 2008 with SQL and Windows XP [yinyang]
 
i want to show the total of all the transactions at the report total section. But since some of the accounts and their details will be supressed, the total i am getting is not right as it is not excluding the suppressed transactions. for example, i have five accounts out of which two are being suppressed as they have transaction = 7083. If i do the running total it will include the suppressed records and when i tried to use the opposite of suppression logic in the running total, its not working.

any ideas??
 
Never Mind, i was able to get the right report total. Just used the same suppression logic but chagned the > to to =< and it worked. earlier i was just using the less than.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top