Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Posted: 09 Dec 2011 at 3:29am
the next twist is going to be, what if there are different lines (which sounds like there are) are these 2 lines always next to each other, or are other lines between them like:
GPSB
something
Labour
and can you have multiples of these on the same invoice, like:
GPSB
GPSB
Labour
something
Labour
something
If either of these scenarios are valid, I think that CR is going to have a hard time finding and suppressing the rows and displaying the values that you want.
Depending on your skill level, my suggestion (no surprise to some) is to this in a stored procedure. There you can easily (well more so than in CR) create and delete the rows / information that you desire, and just return the values to CR that you truly desire.
Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Posted: 10 Dec 2011 at 3:25pm
One way,
Group on invoice
Create 2 formulas to flag each row
If field startswith 'gpsb' then 1
If field = 'labour' then 1
Sum each fo these at the group level
Suppress details when both sums = 1
Sum(formula,invoice)=1
Create another formula field to create your text
If Sum(formula,invoice)=1and Sum(formula2,invoice)=1then 'certain text'
Display in group footer next to the sum of your quantities at the group level
Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Posted: 11 Dec 2011 at 1:58am
To get the sum of a field at the group level you have the function(field,group)
Yours will be something closer to
sum({@formula name},{table.invoice})
By adding the =1 it makes it a Boolean formula to return true whenever that value for that a group =1 and false all the other times
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum