Joined: 05 Sep 2012
Location: United States
Online Status: Offline
Posts: 177
Topic: % formula Posted: 16 Apr 2013 at 6:15am
my % formula that i have working is doing it's job for the details portion but what i'm trying to figure out is how to get it to work on the group totals and footer fields as well.
what i'm using is this:
whileprintingrecords;
if Sum ({field1}, {group}) = 0 then 0 else Sum ({field2}, {group}) * 100 / Sum ({field1}, {group})
it works as it should but at the end of my group i have a totals field that i cannot figure out how to get the percentage on and also the report footer that shows the totals of the report that i cannot figure out the percentage on.
Joined: 01 Mar 2013
Location: United States
Online Status: Offline
Posts: 35
Posted: 16 Apr 2013 at 7:53am
First thing that comes to mind is 'rounding down to zero'. Beyond that, split the formula up to make sure the denominator is non-zero by only displaying that part of the formula; then display the numerator. Finally, go back to the full formula.
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