Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: DrillDownGroupLevel Post Reply Post New Topic
Page  of 2 Next >>
Author Message
SIddhu
Newbie
Newbie
Avatar

Joined: 27 Feb 2008
Location: India
Online Status: Offline
Posts: 22
Quote SIddhu Replybullet Topic: DrillDownGroupLevel
    Posted: 27 Feb 2008 at 4:05am

How do you control the drill down level by using DrillDownGroupLevel = 0 ;

In the sample reports I saw the DrillDownGroupLevel <> 1 ,  DrillDownGroupLevel < 2 ;  DrillDownGroupLevel = 1; and so on..  
What is significance of DrillDownGroupLevel  and how do i use it ?  In what criteria they are using the numbers ? Confused
Thanks,
Siddhu.
IP IP Logged
rahulwalawalkar
Senior Member
Senior Member
Avatar

Joined: 08 Jun 2007
Location: United Kingdom
Online Status: Offline
Posts: 731
Quote rahulwalawalkar Replybullet Posted: 27 Feb 2008 at 6:14am
Hi,
 
Extract from Crystal Help
 
Hope that helps
 
Action
Returns a number that indicates the group level of the current drill down view, or 0 if it is not a drill down view.

Examples
If a report has groups on Country and Region, then DrillDownGroupLevel returns 0 in the view without drill downs. Within the drill down view for a Country, DrillDownGroupLevel returns 1, and within the drill down view of a Region, DrillDownGroupLevel returns 2.

To check if you are in a drill down view, test to see if DrillDownGroupLevel > 0 returns true.

Cheers

Rahul
IP IP Logged
fusion
Groupie
Groupie


Joined: 12 Nov 2007
Location: United States
Online Status: Offline
Posts: 93
Quote fusion Replybullet Posted: 29 Feb 2008 at 2:54pm
Rahul,
I also looked had similar issue. I looked at help and tried to explore the use of it. I even looked at sample reports using drilldowngrouplevel
but I still don't have a good understanding of how it works.
I know that depending on your drill down it is used to show and hide sections.
If possible can you please explain?

IP IP Logged
CRLoader
Newbie
Newbie
Avatar

Joined: 03 Mar 2008
Location: United States
Online Status: Offline
Posts: 3
Quote CRLoader Replybullet Posted: 03 Mar 2008 at 3:31pm
I use DrillDownGroupLevel quite a bit in my reports.
 
First I create a Report Formula with the only text in the formula being "DrillDownGroupLevel". I then drop this into the Page Header of the report, so it shows me the Current Drill Level. Now double click on a group and you will see the Drill Level change to a new number.
 
Now you can selectively suppress certain sections at various times to acheive the desired result. I use <, > , <> and = to acheive the desired result.
 
One example is when I have an alternate Page Header that I want to show during drill down, I would use the following formula on the X-1 Suppress in Section Expert
 
PHa - Main Page Header - formula = DrillDownGroupLevel  <> 1
PHb - Alternate Page Header - Formula = DrillDownGroupLevel = 1
 
You must have both in place or you risk showing both headers at the same time.
 
Hop this helps,
 
Josh
Not NULL, But Hell NULL!!
IP IP Logged
fusion
Groupie
Groupie


Joined: 12 Nov 2007
Location: United States
Online Status: Offline
Posts: 93
Quote fusion Replybullet Posted: 05 Mar 2008 at 11:17pm
Thanks CrLoader.
I tried this myself today and it worked just fine.

Thank you
IP IP Logged
mgroseclose
Newbie
Newbie


Joined: 18 Mar 2008
Location: United States
Online Status: Offline
Posts: 4
Quote mgroseclose Replybullet Posted: 18 Mar 2008 at 10:06am
Josh:
 
Thank you for your code snippet.
 
I'm creating a simple report that has the top 30 zip code counts and allows a drill down to see the accounts for that zip code.
 
The zip code header prints fine.  However, the Group 2 (the accounts) header won't print.
 
I've added the code as you outlined and tried various other things, but can't get the header to print for the account list.
 
Do you have any thoughts of what I could be doing incorrectly.
 
Thanks,
 
Mike
IP IP Logged
CRLoader
Newbie
Newbie
Avatar

Joined: 03 Mar 2008
Location: United States
Online Status: Offline
Posts: 3
Quote CRLoader Replybullet Posted: 18 Mar 2008 at 11:21am

Please show in your message what the formula is for your suppression of that group header. I suspect it is something similar to

DrillDownGroupHeader = 1
 
I would use something like:
 
DrillDownGroupHeader > 0
 
This will enable any further drill down to continue to reveal that group header.
 
I rarely use an "=" sign because any subsequent Drills will suppress the header again.
Not NULL, But Hell NULL!!
IP IP Logged
mgroseclose
Newbie
Newbie


Joined: 18 Mar 2008
Location: United States
Online Status: Offline
Posts: 4
Quote mgroseclose Replybullet Posted: 18 Mar 2008 at 1:46pm
Here is what is in my report:  (note since the SUPPRESSION is actually reverse logic, I've used a little different statement to make it easier for me to understand):
 
PHa     NOT (DrillDownGroupLevel=0)
Phb     NOT (DrillDownGroupLevel=1)
 
GH1     NOT (DrillDownGroupLevel=0)
GH2     NOT (DrillDownGroupLevel=1)
 
The data displays fine.  I show the DrillDownGroupLevel with the data and it is 0 at GH1 and 1 at GH2. 
 
It is the PHb that doesn't display on the GH2 data.
 
Can you see what is wrong?
 
I appreciate your assistance.
 
Mike
IP IP Logged
CRLoader
Newbie
Newbie
Avatar

Joined: 03 Mar 2008
Location: United States
Online Status: Offline
Posts: 3
Quote CRLoader Replybullet Posted: 18 Mar 2008 at 2:32pm
First things first, Did you create a @DrillDownGroupLevel formula and put it in the ReportHeader temporarily? This will tell you the current status of the Drill Down. You can delete it before you publish the report.
 
The reason I say this is because sometimes Crystal will jump Drill levels from say 0 to 2 then to 4...skips over 1. This way you can test and tell what level you are at.
 
As for your problem, I think the following will work. Try altering your statement for PHb to say:
 
NOT (DrillDownGroupLevel <> 0)
 
This way, you will cover any Drill scenario that Crystal may use....apply this to GH2 as well.
 
Let me know if it works.
Not NULL, But Hell NULL!!
IP IP Logged
fusion
Groupie
Groupie


Joined: 12 Nov 2007
Location: United States
Online Status: Offline
Posts: 93
Quote fusion Replybullet Posted: 18 Mar 2008 at 3:05pm

I had a similar problem. I found that it was the report option setting that did not let the Page header display. So perform the following steps:

File- Report Option-Show All Headers on Drill Down

File- Options.. - Reporting Tab- Show All Headers on Drill Down
 
If your formula is right, doing this should solve your problem.
IP IP Logged
Page  of 2 Next >>
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.