Print Page | Close Window

Can't get this to suppress right.

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=22150
Printed Date: 29 Apr 2024 at 6:26pm


Topic: Can't get this to suppress right.
Posted By: Doolhoff
Subject: Can't get this to suppress right.
Date Posted: 18 Nov 2016 at 6:23am
I am pretty new to crystal, but my boss wants me to modify a report for use in the company. I have made a lot of progress just by messing around with different options but I am now hitting a road block while trying to get the proper information to suppress while not suppressing the other data. Please help.

This is a picture of what I am trying to do.

Also, can I attach a photo directly from my computer or do I need to host it online before I can share it? Sorry dumb question.





Replies:
Posted By: DBlank
Date Posted: 18 Nov 2016 at 8:36am
consider a conditional suppression using the inventory Ref field
something like
not onfirstrecord or previous(table.inventoryrefnum) = table.inventoryrefnum


Posted By: Doolhoff
Date Posted: 18 Nov 2016 at 8:41am
I will give it shot and let you know.


Posted By: Doolhoff
Date Posted: 18 Nov 2016 at 8:51am
So it worked, kinda. It did suppress what I wanted but also WAY more than needed.

Here's a photo:



Posted By: DBlank
Date Posted: 18 Nov 2016 at 9:15am
Did you place the suppression formula only on the qty field? That was where it should go, not on the section.


Posted By: Doolhoff
Date Posted: 18 Nov 2016 at 9:37am
So, not in section expert..? Sorry, like I said, I'm still kinda new to crystal.


Posted By: DBlank
Date Posted: 18 Nov 2016 at 10:20am
Right click on the quantity field
Select format field
Select the suppress formula button
Place the formula in there
Test it out


Posted By: Doolhoff
Date Posted: 18 Nov 2016 at 10:37am
Here is what happens:



Posted By: Doolhoff
Date Posted: 18 Nov 2016 at 11:36am
So I just found that I have been trying to suppress the wrong table inside the formula field. I am now encountering an issue where the first item, no matter what is before it, has the quantity suppressed.

I think I am on the right path. Thank you so much for your guidance DBlank!


Posted By: DBlank
Date Posted: 18 Nov 2016 at 11:41am
use the
"not onfirstrecord"

otherwise the previous(field)<> field will suppress it because is comparing nothing to somehting which is not the same and suppresses it.


Posted By: Doolhoff
Date Posted: 18 Nov 2016 at 12:24pm
Oh, that makes sense. How exactly would I write the code for that? I can't figure that one out.


Posted By: DBlank
Date Posted: 21 Nov 2016 at 3:01am
not onfirstrecord or previous(table.inventoryrefnum) = table.inventoryrefnum


Posted By: Doolhoff
Date Posted: 28 Nov 2016 at 7:47am
Thank you so much! Just as a heads up for anyone else who has followed this, I had to use "and" not "or" in the line to accomplish what I needed.

Thank you again DBlank, and sorry for taking so long to reply!



Print Page | Close Window