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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Suppressing and Variant Group Display Styles

Status
Not open for further replies.

NickM

Programmer
Apr 6, 2001
2
US
I have to write a report that is supposed to display the group differently, based on the number of detail record(s) in the group. If there's multiple records, then they want a group header and separate detail lines. That part, I've got done, and it's fairly standard. The trouble is, if there's one one detail record, then they want everything on one line with the subheading field suppressed. That's where I'm stuck.

Here's what the data and report is supposed to look like.

Name EFIN SSN Profit/Loss
BEETLE, BENJAMIN B
Schedule C-1 123456 135-22-3333 $668,235
Schedule C-2 123456 135-22-3333 $75,050
ADAMS, SAMUEL & SARAH 123456 999-78-0987 $975,000
GARRETT, DAVID G 789456 222-56-9870 $219,282
CARVER, ABRAHAM B 987321 144-65-3333 ($6,850)

As you can see, the "Schedule C-#" count is supposed to be suppressed, if the person has only one record, and everything is supposed to be displayed on one line. I can generate the first report format easy enough, ie. "Beetle", but how do I vary it? How do I know in advance how many records are being returned for each group?

Thanks,
Nick Michels
 
Nick,

Create two detail sections with the alternative formats and suppress/show them based on a COUNT of how many records you have in each group.

Suppress the Group Header based on the same conditional logic.

hth,
- Ido
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top