Print Page | Close Window

can you save a summary total as a variable?

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=13478
Printed Date: 06 May 2024 at 10:14pm


Topic: can you save a summary total as a variable?
Posted By: andyme
Subject: can you save a summary total as a variable?
Date 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



Replies:
Posted By: comatt1
Date 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?


Posted By: andyme
Date 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?


Posted By: comatt1
Date 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


Posted By: freestylepunk
Date 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})



Posted By: andyme
Date 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})



Print Page | Close Window