Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Main Report SubReport Total Post Reply Post New Topic
Author Message
jwilliams
Newbie
Newbie


Joined: 23 Nov 2013
Online Status: Offline
Posts: 12
Quote jwilliams Replybullet Topic: Main Report SubReport Total
     Posted: 31 Dec 2013 at 3:31am
I have a main report that consists of
Provider         Referral Count
A                                1
B                                15
C                                96
 
In a SubReport I have an overlay showing the Total Visit Count
                                                            Visit Count
 
While in preview I see
Provider           Referral Count              Visit Count
 
I need a percentage of Outgoing Referrals per provider.
 
Because I have totals in each report how Can I get to a place where the system will look at each total so I can do the division?
 
Thanks for your help!
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 02 Jan 2014 at 4:51am
shared variables...
in the main report before the subreport is called a formula like this will reset the variable:
shared numbervar visits:=0;
""//will hide the zero on the report

in the subreport, probably the group or the report footer:
shared numbervar visit := count({table.field});
""//again to hide the total visits

back in the main report...after the subreport
shared numbervar visit;
referal count / visit //or whatever the true logic is

HTH
IP IP Logged
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