Print Page | Close Window

Cannot summarize

Printed From: Crystal Reports Book
Category: Crystal Reports for Visual Studio 2005 and Newer
Forum Name: Tips and Tricks
Forum Discription: Have you learned some great tricks to share with the group? Post them here!
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=8112
Printed Date: 26 Apr 2024 at 5:08pm


Topic: Cannot summarize
Posted By: billym17
Subject: Cannot summarize
Date Posted: 23 Oct 2009 at 11:17am
I created a report with  a column that calculates commission but I cannot summarize it. I want to get a subtotal per day of the commissions.
I appreciate any help. Thanks

Here is the formula
// This tests the number of chits per day for a class in indoor fitness and claculates the commission
// sorts indoor fitness sales items
if {tblPOSItems.POSItemCode} startswith "N" then
//counts chits and determines if chits are less than or equal to 5
(if count({tblPOSChits_ItemDetails.POSChitDate},{tblPOSChits_ItemDetails.POSChitDate}) <= 5
// if true chit amount will be commission amount
then {tblPOSChits_ItemDetails.GrossAmount}*1.0
// if chits are over 5 then commission will be only 70%
else {tblPOSChits_ItemDetails.GrossAmount}*.7)
else {tblPOSChits_ItemDetails.GrossAmount}*.7




Replies:
Posted By: BrianBischof
Date Posted: 23 Oct 2009 at 11:47am
CR works in two passes. Basically, the first pass gathers all the data and the second pass calculates summaries. You can't calculate a summary on certain formulas b/c they get calculated as the report is running (e.g. you are already using the Count function in it which is done in pass 2). What you need to do is create another formula which summarizes the data for you and use that value instead.


-------------
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>


Posted By: billym17
Date Posted: 23 Oct 2009 at 11:55am
I'm new in Crystal. How do you create that formula?



Print Page | Close Window