Print Page | Close Window

Totaling Based on Conditions

Printed From: Crystal Reports Book
Category: Crystal Reports .NET 2003
Forum Name: Data Connectivity
Forum Discription: How to connect to data sources and export reports
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=12735
Printed Date: 03 May 2024 at 2:53am


Topic: Totaling Based on Conditions
Posted By: shortwrite
Subject: Totaling Based on Conditions
Date Posted: 28 Mar 2011 at 10:01am
I am trying to create totals by region based on conditions. 
 
Example:
If the northeast region has a condition = "CU Approved" or "SVP Approved" then add to a count for "Approved" for that region.
 
Can anyone help?  I am not an experienced Crystal Reports developer, and the only reference I have available is the online Help.
 
Thanks!



Replies:
Posted By: jkwrpc
Date Posted: 11 Apr 2011 at 8:59am

You can use a Running Total. Select the field having the informatin set it to count and under evaluate use the formula. You then enter "CU Approved" or "SVP Approved" which will evaluate to true and increment the counter.  You then can place the Running Total field on the report just like you would any other data field. If a running total will not do what you need you can always create a series of formulas to do the counting . This is described in the CR Help files and I know a number of times in this forum.

Hope this help, assuming you have not already obtained the answer since it have been a couple of weeks when this was posted.
 
Regards,
 
John W.
http://www.CustomReportWriters.net - www.CustomReportWriters.net
 


Posted By: comatt1
Date Posted: 25 May 2011 at 10:00am
Another note, if you are using running totals with this. YOu need to put the running total within a footer (group/report).

The other option would be to use shared variables.


Posted By: hilfy
Date Posted: 26 May 2011 at 4:58am
Another option is to do a formula like this:
 
mailto:%7b@IsApproved - {@IsApproved }
If {table.condition} = "CU Approved" or {table.condition} = "SVP Approved" then 1 else 0
 
You then do a sum on this to get your count.  Unlike running totals, this number can be placed in group headers.
 
-Dell


-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics



Print Page | Close Window