cancel
Showing results for 
Search instead for 
Did you mean: 

Suppress an order if it doesn't contain a particular item.

Former Member
0 Kudos

Hi,

I have a report that groups as such:

Salesperson Name

Customer Number

Order Number

Line Number

Line Item Number

I currently do a lot of collapsing and bucketing, but I don't see where that would affect my new need.

I want to be able to enter a Product number and if that Product doesn't that product isn't on either the Line or the Line Item, then I want to suppress that Order, and all of its detail.

I believe I've worked through something similar by setting a variable associated with the record as it's being selected, but I don't recall how I filtered after that, and associated it with an Order Number.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

Thank you Dell.

At this point, I don't think a subreport is going to add anything for me.  I can't reject a record until I'm satisfied that there are no other records for that same order that meet the criteria.

If a subreport can't return a derived value, then it looks like the slicing needs to be done with the SQL.

Before I go nutty with the SQL (not an expert), will Crystal support temporary tables created within a Command?

Former Member
0 Kudos

Close

Former Member
0 Kudos

Hi,

Can anyone tell me if this possibly needs to be reconstructed with a subreport?

If i break out:

Order Number

Line Number

Line Item Number

into a subreport, then use logic that sets a value in the Order Number Footer, can that value be passed back to the main report to determine if the subreport prints for that Order?

DellSC
Active Contributor
0 Kudos

Unfortunately, you can't use a value from a subreport to determine whether that subreport will be suppressed in the main report.  The suppression for a section is evaluated prior to the contents of the section.

I might base the subreport on a Command that will filter out any records that don't meet the criteria you want to use for suppression - that way you only get records in the subreport if you have data that you want to show.  From there, suppress all of the sections in the subreport if some key field is null.  Then turn on "Suppress blank section" for the section in the main report that contains the subreport.

-Dell

abhilash_kumar
Active Contributor
0 Kudos

Hi Matt,

Do you have an example dataset please?

-Abhilash

Former Member
0 Kudos

Yes.

Thank you, Abhilash.

abhilash_kumar
Active Contributor
0 Kudos

So, you plan to create a prompt to select Products, correct?

How about you add this prompt to the record selection formula so that the report only gets records for the said products?

-Abhilash

Former Member
0 Kudos

Actually, since the original report is kind of "optimized" for export to Excel, this will be forked into it own distinct report.

What I'm look for is All Products for a given Order, reporting on only Orders that contain the specified Product.