Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CR 9: Counting Unique Detail Section Records 1

Status
Not open for further replies.

JStandard

Programmer
Mar 15, 2005
22
US
Greetings,

I have a fairly straightforward report that has a group header, details and 2 items in the group footer, 1a and 1b.

I am attempting to suppress both of the group footers if a certain field in the details section only has one record in it.

Ex. There are two components to an investment, the manager and the fund. One manager can manage many funds, but one fund can only have one manager (Typical one-to-many). In my report I have the following scenarios, which a user has the option of displaying:

1. Show all managers and all of their corresponding funds
2. Show one particular manager and their specific funds
3. Show one particular fund and by design, only one manager

I am interested in scenarios 2 and 3, since in both cases, the manager field only shows one manager.

The real key here is if I "Browse Field" on the Manager field, only one manager will show up. I am wondering if there is some way I can use this to write a rule to suppress both of my group footers. From a higher level view, something along these lines in the suppression formula:

If count(NumberOfUniqueManagers) > 1 then
suppress
else
no suppress

This might be a bit hard to explain but let me know if this makes sense, or if I need to provide more information, as I'll gladly do so.

Thanks everyone,

Jeff.
 
Try using the following as a suppression formula:

distinctcount({table.manager},{table.groupfield}) > 1

You didn't say what your group field was, so if this isn't sufficient, you should specify what it is.

-LB
 
lbass,

It took me long enough to finally get around to it (I am so ridiculously backlogged on reports), but that distinctcount worked perfectly.

Thanks lbass,

Jeff.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top