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!

Automatically show detail when record count is 1 1

Status
Not open for further replies.

jontvr

IS-IT--Management
Aug 30, 2002
17
0
0
US
Is it possible to get a report to open and automatically show the detail? When the record count is greater than 1, I want the summary, detail hidden report to display, but if the record count is 1 I want it to automatically show the detail and avoid the drill down.

Any ideas?
The report is written in CR9 and published on Enterprise 9
 
I assume you want details in groups. If so, you need to use a summary count, which is totted up before the group printing logic is accessed.

You get a summary count by right-clicking on a data field and then selecting [Insert] and [Summary]. This gives you a total that can be used to decide what to print.

Madawc Williams
East Anglia
Great Britain
 
Thanks, but maybe I wasn't clear. I want the report to open already drilled down if the record count is 1, saving the user the bother. Similar to a conditional suppress, I want to do a conditional hide on the detail section.

Something like....

If RecordCount = 1 Then ShowDetail = True
Else ShowDetail = False

I've made up the ShowDetail function for this example, but is there anything I can do that will have the same effect?

jontvr
 
Jontvr (TVR driver?)

You're very close.

To do this, you wouldn't conditionally hide, you'd conditionally suppress. This means that the hide/reveal functionality becomes entirely automated, so the users won't be able to activate ad-hoc drill downs.

Go into Details/Format section, and set the conditional suppression to 'Count({YourKeyField}) <> 1'.

When there's only one record, the details section will be displayed, otherwise not.

Naith
 
Thanks Naith. I guess I couldn't see the wood for the trees.
As Homer would say...Doh!!
 
I came across this thread when looking for something similar, but not exactly the same.

The conditional suppress wouldn't work in my case because when the details are suppressed, I still want drill down.

What we're planning is that the end user would have a parameter choice which would drive whether they see all the details or have to drill down on the details by group.

The issue that prompts this need is that, on ePortfolio, if a report is published with drill down and, for example, four groups are returned, the end user has to drill down four different times to see/printout each group. If they want to print all groups and the details, they should be able to have all the details open. If they only want to see one or two groups, it's easier if the details aren't displayed and they can drill down where necessary.

Any ideas? Am I making any sense? (It IS the Friday befroe a long weekend, you know!!) :)

jennifer.giemza@uwmf.wisc.edu
 
Unfortunately the Hide can't be driven by code, so the way I've handled this is to insert the report into 2 different sections of a container report, and then suppress the appropriate section based on the parameter.

One version would have the Hide on, the other would not, or whatever you need.

-k
 
That's a great idea! I'll try it - thanks!!

jennifer.giemza@uwmf.wisc.edu
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top