Tips and Tricks
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005-2015 : Tips and Tricks
Message Icon Topic: Cannot summarize Post Reply Post New Topic
Author Message
billym17
Newbie
Newbie


Joined: 23 Oct 2009
Online Status: Offline
Posts: 7
Quote billym17 Replybullet Topic: Cannot summarize
    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

IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet 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.


Edited by BrianBischof - 23 Oct 2009 at 11:48am
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>
IP IP Logged
billym17
Newbie
Newbie


Joined: 23 Oct 2009
Online Status: Offline
Posts: 7
Quote billym17 Replybullet Posted: 23 Oct 2009 at 11:55am
I'm new in Crystal. How do you create that formula?
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.016 seconds.