Print Page | Close Window

Conditional - Don't Run Running Total

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=22994
Printed Date: 28 Apr 2024 at 9:11pm


Topic: Conditional - Don't Run Running Total
Posted By: sfullergs
Subject: Conditional - Don't Run Running Total
Date 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.



Replies:
Posted By: lockwelle
Date 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


Posted By: kevlray
Date Posted: 25 Jan 2022 at 4:07am
In the Evaluate portion of the running total you could just have CTCountARSON = "Y"


Posted By: lockwelle
Date 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


Posted By: kevlray
Date Posted: 26 Jan 2022 at 4:10am
No problem.  That is why we are all here.  I am not an expert in other areas.



Print Page | Close Window