Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Conditional - Don't Run Running Total Post Reply Post New Topic
Author Message
sfullergs
Newbie
Newbie


Joined: 06 Nov 2019
Online Status: Offline
Posts: 13
Quote sfullergs Replybullet Topic: Conditional - Don't Run Running Total
    Posted: 18 Jan 2022 at 2:01pm
I have a report where I may or may not be pulling data for 2 different years so that I can compare numbers for different categories, depending on how some parameters are answered. I then have running totals with formulas to evaluate, so that each category for each year has the proper numbers. I also have formatted the field for the comparison year where you can put in a N for a certain parameter and it will suppress the comparison year. Here's the bottom line:

For example, I need the running total named CTCountARSON to not run if the parameter CompareYN = N.

The reason for this is, even if the comparison fields are suppressed because the CompareYN parameter is set to N, the running totals will still run. Those particular running totals use the parameters CBeginningDate and CEndingDate, which would be blank if CompareYN is answered no. I will then get an error from the running totals saying the formulas can't run because CBeginningDate and CEndingDate are not defined.

Any help with this would be appreciated.
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 24 Jan 2022 at 6:11am
DBlank is the master of the running total...

Have you tried using a formula in the running total.

My initial thought is a true false if statement...something like CTCountARSON = "Y"


the other idea is somethink like:
if CTCountARSON = "Y" then
   {table.field}
else
0

Again, I am not the expert, and it is something to try.

HTH
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 25 Jan 2022 at 4:07am
In the Evaluate portion of the running total you could just have CTCountARSON = "Y"
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 25 Jan 2022 at 7:25am
Glad that someone with more knowledge chimed in.

Like I said...I am no expert on Running Totals
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 26 Jan 2022 at 4:10am
No problem.  That is why we are all here.  I am not an expert in other areas.
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.