Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Formula "Total" Issue Post Reply Post New Topic
Author Message
psalm19
Groupie
Groupie
Avatar

Joined: 19 Feb 2009
Online Status: Offline
Posts: 48
Quote psalm19 Replybullet Topic: Formula "Total" Issue
     Posted: 30 Sep 2009 at 11:03am
Running CR Pro. 10
 
Got a report that I'm having a "Grand Total" formula issue with...the formula below is in RFooter B. <br><br>
 
{#Local}+{#National}+{#Prospects}<br><br>
 
It works well when there is data in each of the three buckets but if any of them are empty then the Grand Total is empty.
 
Here's an example of the {#Prospects} "Running Total" formula the other two (Local and National) are similar.
 
({tblReps.RepNumber} in [3,247,253,280,282,479,504,592])
and
({tblAccounts.AccountType} = "Prospect")
 
Any ideas on how I can fix this problem?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 30 Sep 2009 at 11:48am
Usually happens when you are dealing with all NULLS for one of your formulas.
Does this seem to be the case?
IP IP Logged
psalm19
Groupie
Groupie
Avatar

Joined: 19 Feb 2009
Online Status: Offline
Posts: 48
Quote psalm19 Replybullet Posted: 30 Sep 2009 at 1:10pm
Yeper...that's exactly what's happening. One or more of the three "sub-totals" is null thereby causing my problem. (
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 30 Sep 2009 at 1:19pm
maybe this...
(if isnull({#Local} then 0 else {#Local})
+
(if isnull({#National}) then 0 else {#National})
+
(if isnull({#Prospects}) then 0 else {#National})


Edited by DBlank - 30 Sep 2009 at 1:19pm
IP IP Logged
psalm19
Groupie
Groupie
Avatar

Joined: 19 Feb 2009
Online Status: Offline
Posts: 48
Quote psalm19 Replybullet Posted: 30 Sep 2009 at 3:11pm
DBlank,
In your example I had to make the following adjustments; the first #Local was missing a right bracket and the last line had to be adjusted, replaced #National with #Prospects and all was well!
 
Thank you very much for your help in solving this issue! I'm sure I speak for many who frequent this forum, your generosity in sharing your wealth of knowledge of Crystal Reports with others is very much appreciated!!!
 
 
IP IP Logged
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