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

Conditionally suppress detail section 1

Status
Not open for further replies.

vbit

Programmer
Jul 31, 2001
47
US
I am using CR 8.5.

I have a report that contains two groups. Group 2 is hidden for drill-down. I want to be able to conditionally suppress my Detail section so that when I drill-down into Group 2 it shows the Detail section as well (but not until Group 2 is visible).
 
What is happening now? Are you trying to get Group 2 and Details to appear at the same time on a drill down from Group 1? Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Yes. I want to Group 2 and Details sections to appear at the same time.

I have tried adding a formula that sets a boolean value to true in Group 1. Then placing a conditional suppress in the detail section based on whether the first formula is true.

The 1st formula (in Group 1):

global booleanvar hide:=true


The 2nd formula (in conditional suppress of Detail section):

if hide = true then
true
else
false

This works fine on the first page of drill down, but the Detail section is suppressing on the second page of the report.
 
So Hide is always true? Then it will always suppress which prevents drill down.

Why not use sorting instead of Grouping within group 1. You could conditionally suppress a Detail subsections to make it look like a group header for group 2, and they would all appear at once. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
No, Hide isn't always true, because once I drill down, Group 1 is not visilbe anymore. Only Group 2 and the Detail section are visible in the drill down. Therefore, once I drill down, Hide becomes false and the Detail section becomes visible. The problem is that the Detail section suppresses again on the second page of the drill down and I'm not sure why.

I tried to create a sort instead of a group for Group 2 like you said. It seemed to work, until I realized that I had a formula in Group 2 which is based on Group 2. The formula is as follows:

If Sum(Weight, Group 2 Name) = 0 Then 0 Else
Sum(Score, Group 2 Name) / Sum(Weight, Group 2 Name) * 100

How do I get around the fact that I need this percentage based on the grouped information?

Thanks.
 
If you have a percentage, you will need a group. But I have an answer for you. I didn't realize that variables would reinitialize on a drill down. With that piece, I have a solution:

Put the following formula in the *Report* Header:

WhilePrintingRecords;
booleanvar hide:=true

Now hide GH2 and GF2, and conditionally suppress the details using the following formula:

WhilePrintingRecords;
booleanvar hide

Let me know if that solves your problem. It worked for me on the second page of the report, and on the second page of the drill-down.




Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
That seems to work great!

Thank you
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top