• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 42
  • Last Modified:

Efficiency of using the Running Total Function in Crystal Reports vs an If Then Else vs Select Case statement.

Working with an Oracle database and Crystal Reports.

I have to get a series of values from a common field and put them in column "buckets" so to speak.
As seen in the Excel spreadsheet.
If the field {TableName.Labor_Code} = "FMG" then {TableName.Total_Cost}  else 0
If the field {TableName.Labor_Code} = "HNG" then {TableName.Total_Cost}  else 0
If the field {TableName.Labor_Code} = "SUP" then {TableName.Total_Cost}  else 0
For all Type Codes = FMG, HNG, SUP, FIN, CLN.....you get the point!

My question is would it be more efficient to build these columns in an individual formula like above
or use a Running Total from Crystal Reports to generate the columns so that they are totaled at the right interval.
Fletcher Burdine
Fletcher Burdine
1 Solution
How about using a crosstab

Not sure what you are using to separate it into rows
DO you have different sections based on a field that isn't shown?

As far as  your question, I don't think you will notice any appreciable difference between the 2 methods.
I personally prefer the formula method since I feel I have more control but I know people who like running totals.
A little less work on you part to setup

Fletcher BurdineTableau Trainer & Consultant Sales Exec.Author Commented:
Thank you sir. I thank you for the support. Had a problem with my Hosting company and did not realize I was not getting emails from them. Looks like I got hacked and my identity compromised My bank even found fraud on my accounts. Multiple purchases I did not make. Sorry for the delays gentlemen. Fixing that problem so I can get emails again.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now