Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Suppressing Values Post Reply Post New Topic
Author Message
motoxracer400f
Newbie
Newbie
Avatar

Joined: 11 Sep 2007
Location: United States
Online Status: Offline
Posts: 27
Quote motoxracer400f Replybullet Topic: Suppressing Values
    Posted: 11 Sep 2007 at 7:22am
Hi,
I am a bit new at this and am having a major problem trying to figure out how to suppress values in a column based on another columns values.
 
HERE IS THE SITUATION:
I've created an Open Jobs Report with a "Job" column and a "Price" column.  I've summarized the "Price" column to create a backlog total.  Some of the Jobs are being repeated because they are a delivery date in the system and they are also repeating the Price and this is throwing off the backlog total.  I still want the jobs to repeat but I don't want the price to show up in the total if it is a repeat job number.
 
How do I supress a record in the "Price" column if a record in the "Job" column is a repeated value?
 
Can anyone please help?  Thank you so much!
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 11 Sep 2007 at 7:39am
You'll have to use some formulas - one to suppress the value on the report and another to get correctly run your totals.
 
I assume there is a unique field that identifies a "job" and that you are either grouping or sorting on it.  I also assume that the record where you want to display the price is always the first one for the job.
 
On the report, right-click on the price field and select Format Field.  Click on the formula button next to "Suppress" and enter something like this:
{table.JobID} = previous({table.JobID})
 
For the total, create a price formula that looks something like this:
If {table.JobID} = previous({table.JobID}) then 0 else {table.Price}
 
Use this formula in your sum instead of summing the price field.
 
-Dell
IP IP Logged
motoxracer400f
Newbie
Newbie
Avatar

Joined: 11 Sep 2007
Location: United States
Online Status: Offline
Posts: 27
Quote motoxracer400f Replybullet Posted: 11 Sep 2007 at 8:05am

I got the column to show 0 for the repeat prices.  Thanks a lot guys!  I really appreciate it.  Now I just need to figure out how to sumarize the formula.  It wont let me add the formula to the summary.

IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 11 Sep 2007 at 8:34am
There are a couple of things you can try.  I know I've been able to do this, but I don't remember exactly what I did and I don't have time to play with it right now.
 
- See if you can set up a Running Total on the Price field that only adds it when you want it.
 
- Play with adding "WhilePrintingRecords;" or "WhileReadingRecords;" to the beginning of the price formula.
 
- Set up another formula "Price for Sum" or something of the sort that only has {@Price} in it (or whatever you named the first formula...) and see if it will let you sum that.
 
-Dell
IP IP Logged
motoxracer400f
Newbie
Newbie
Avatar

Joined: 11 Sep 2007
Location: United States
Online Status: Offline
Posts: 27
Quote motoxracer400f Replybullet Posted: 11 Sep 2007 at 10:27am
Big%20smile It worked!!!  Thank you so much for being such a BIG help!!!!! Big%20smile
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.