Suppress Detail Forumla

Printed From: Crystal Reports Book — Forum Name: Technical Questions

Hey All,

I'm working on a report that looks at my companies online promotions and the products that are effected for our Inside Sales team. Some of our promotions are on all products (3500+) and some are just on 4 products or so.

What I'm looking to do is show a list of all the products when the count is less than 50 and where the count is more than 50 - I'd like the report to say "All Products"

Any help would be much appreciated.
While I typically don't like to use subreports, if you have a table that has the products and the promotion, you could create a subreport that basically returns either the All Products or the list.

How? I would have the report count the number of items for the promotion in the report header, and the promotion would be what you link the subreport to the main report on. Set a variable to the count, because we will use it later.

In the group header, have a suppression formula like
shared numbervar productCount;
productCount <= 50

in the detail section the suppression formula would look like
shared numbervar productCount;
productCount > 50

the group header would just have All Products and the detail section would list the names of the products.

It should work...and I've been wrong before.

HTH