Click to See Complete Forum and Search --> : After Detail Band Print


ksukat
November 11th, 2009, 10:39 AM
Greetings,
I have an existing Crystal Report that I am modifying. I am a noob with Crystal so bear with me.
I have 1 field being passed into crystal by a stored procedure. I have detail A and Detail B bands on my report. Detail A section is supressed if the field is negative. Detail B is supressed if the field is positive.

Now the fun. I need to have a total variable that is the sum of the positive amounts. Also, I need a total variable that is the sum of the negative amounts. Since it is only one field passed in by the stored procedure, my thoughts turned to a "After print" for the bands. But I don't see that in the section expert, etc.

So, anybody have an idea on how to crack this problem ?

thanks.

jggtz
November 11th, 2009, 12:02 PM
Welcome to CodeGuru forums!

Think about the next

A: You can use only one detail section and two columns: positives and negatives,
and instead of display the field you can use 2 formula fields, one for positives an one for
negatives

//formula for positives
If {Table.Field}>=0 Then {Table.Field} Else 0



//formula for negatives
If {Table.Field}<0 Then {Table.Field} Else 0

Then you can display in only one detail section and sumarize both columns


B: Use two Running Total fields conditioned by >=0 & <0