Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: Margin in sub total and total Post Reply Post New Topic
Author Message
davidais
Newbie
Newbie


Joined: 26 Nov 2012
Location: United Kingdom
Online Status: Offline
Posts: 1
Quote davidais Replybullet Topic: Margin in sub total and total
    Posted: 26 Nov 2012 at 4:56am
Hi all,

I have used the following formula for each month to calculate margin:

If {Command.Nov12Val} = 0 then 0
else ({Command.Nov12Val}-{Command.Nov12Cost})/{Command.Nov12Val}*100

However I have pulled the SQL down and manually calculated the margin and it is way out.

I have stuck the same calculation on both group header #1 (sub total) and report footer (total) sections and it doesn't auto adjust depending on its placement or produce accurate results.

Many thanks, D
IP IP Logged
Sastry
Moderator
Moderator
Avatar

Joined: 16 Jul 2012
Online Status: Offline
Posts: 537
Quote Sastry Replybullet Posted: 26 Nov 2012 at 6:49pm
Hi
 
Try the following to get accurate results :
 
If {Command.Nov12Val} = 0 then 0
else (({Command.Nov12Val}-{Command.Nov12Cost})/{Command.Nov12Val})*100
 
 
And you need to insert summaries independently on group and report footers.  Summary will not give you correct values based on placement.
 
 
Thanks,
Sastry
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
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



This page was generated in 0.031 seconds.