Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: can you save a summary total as a variable? Post Reply Post New Topic
Author Message
andyme
Newbie
Newbie
Avatar

Joined: 19 Feb 2010
Location: United Kingdom
Online Status: Offline
Posts: 15
Quote andyme Replybullet Topic: can you save a summary total as a variable?
    Posted: 13 Jun 2011 at 1:02am
Hi All,

Hope one of you may be able to help, I need to store the total number of a summary as variable so I use that number in another calculation in the same report.

Is this possible?

Thanks
Andy
IP IP Logged
comatt1
Senior Member
Senior Member
Avatar

Joined: 19 May 2011
Online Status: Offline
Posts: 337
Quote comatt1 Replybullet Posted: 13 Jun 2011 at 2:42am
if you are using running totals, you can reference that value; it really depends where you intend to work with the RT. Anymore specifics on what is happening, where?
IP IP Logged
andyme
Newbie
Newbie
Avatar

Joined: 19 Feb 2010
Location: United Kingdom
Online Status: Offline
Posts: 15
Quote andyme Replybullet Posted: 13 Jun 2011 at 2:59am
Basically I want to take the total of people and also the total of lessons and then use it in another field to find the average no of attendances (total no of people/no of lessons) any ideas?
IP IP Logged
comatt1
Senior Member
Senior Member
Avatar

Joined: 19 May 2011
Online Status: Offline
Posts: 337
Quote comatt1 Replybullet Posted: 13 Jun 2011 at 3:20am
Sure that shouldnt be too difficult; are you using running totals, if you are, you could actually just make the type of summary - average and you dont need to worry about it.

If you want some more assistance, private message me I could get into more detail
IP IP Logged
freestylepunk
Newbie
Newbie
Avatar

Joined: 05 May 2011
Location: United States
Online Status: Offline
Posts: 13
Quote freestylepunk Replybullet Posted: 14 Jun 2011 at 2:47pm

For totals of a group:  Sum ({column_to_sum}, {grouping field})

For grand totals: Sum ({column_to_sum})

IP IP Logged
andyme
Newbie
Newbie
Avatar

Joined: 19 Feb 2010
Location: United Kingdom
Online Status: Offline
Posts: 15
Quote andyme Replybullet Posted: 14 Jun 2011 at 10:49pm
cheers for the help, I found a way to do it if anyone else has the similar problem, see below.

Create a new formula field, name it, and use the following formula.

WhilePrintingRecords;

NumberVar Total_YP;

Total_YP:= DistinctCount ({YSESSION_ATTENDANCE.Client_No}, {@Weekday})
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.