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

Main Page vs Drilldown 1

Status
Not open for further replies.

cestonina

Programmer
May 25, 2003
30
0
0
SG
Hi there,

I'm using Crystal Reports 8.5. I have a report wherein users can drilldown the crystal report for more info. I'm having problems with my report format (aesthetics) reg. drilldowns.

Question: Is there a field or function that will tell me if I am on a drilldown page or if I am on the main report page?

I need this info so I can use it in my "Suppress" formula (eg. drilldown = true). So I would hide certain items when I am in the main page and vice versa.

Appreciate any help. Thanks.

Regards,
Chris

 
haven't used 8.5 in ages but in 9 there is a the function DrillDownGroupLevel that tells you how far you have drilled into a report.
 
You could set Global Variables to some value (any number, really) and check the value of this variable in the drilldown. It should be at 0 (If you don't have "Display all Headers on Drilldown" turned on)

For example, create a formula called G1 and ploace it in the report header.
@G1
WhilePrintingRecords ;
NumberVar g1 := 1

When you drill into your first group, you'll find that the value of g1 is now 0.
So, you might have a section that contains column headings that you only want to show when you're drilled into the group. Format that section's suppress property as follows:
WhilePrintingRecords ;
NumberVar g1 = 1

The section will be suppressed while viewing the main page of the report, but will be shown on drill down.

You can expand on this if you have multiple layers of drilldown. eg Place a formula called G2 in Group Header #1
@G2
WhilePrintingRecords ;
NumberVar g2 := 1

Then check for its value on drilldown.

This is a very clunky method, and I'm very glad for the DrillDownGroupLevel function that was given to us starting in v9. But if your clients are stuck in v8.5 or earlier, this will work for you.




Bob Suruncle
 
Hi Bob and huggyd,

Thanks for your tips. Will surely help me with my reports (both for 8.5 and 9.0).

Regards,
Chris
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top