Print Page | Close Window

DrillDownGroupLevel

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=2451
Printed Date: 29 Apr 2024 at 6:03am


Topic: DrillDownGroupLevel
Posted By: SIddhu
Subject: DrillDownGroupLevel
Date 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.



Replies:
Posted By: rahulwalawalkar
Date 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


Posted By: fusion
Date 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?



Posted By: CRLoader
Date 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!!


Posted By: fusion
Date Posted: 05 Mar 2008 at 11:17pm
Thanks CrLoader.
I tried this myself today and it worked just fine.

Thank you


Posted By: mgroseclose
Date 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


Posted By: CRLoader
Date 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!!


Posted By: mgroseclose
Date 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


Posted By: CRLoader
Date 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!!


Posted By: fusion
Date 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.


Posted By: mgroseclose
Date Posted: 18 Mar 2008 at 5:53pm

Changing the report options fixed the issue.

Thank you for chiming in and offering your expertise.
 
Mike


Posted By: mgroseclose
Date Posted: 18 Mar 2008 at 5:54pm

Changing the report options fixed the issue.

Thank you for your assistance.  Your code and the report options helped me to create a nice drill down.
 
Mike


Posted By: Samir Bhatt
Date Posted: 24 Sep 2008 at 4:18am
Hi,

Your simple and precise answer helped a lot to get me through the problem of drill down  implementation.
Tongue

-------------
Sam


Posted By: Pankaj_Navlekar
Date Posted: 11 Apr 2012 at 7:35pm
Hi !
 
I had a scenario when this DrillDownGroupLevel  was helpful. In my report, I had created a custom group so that I could drill-down from it. I wanted to place static headers to be shown only in the drill-down data and not the top-level. I created the static headers in the main report and suppressed them in the main report. This is how I wrote my "Suppress" formula for the Header text object
 
If DrillDownGroupLevel  = 0 then true else false
 
So in the main report it will be suppressed because DDGL will be 0, but the headers were showing in the drill-down!
 
Hope this helps you to understand the use of this
Regards


Posted By: Randin
Date Posted: 31 Jan 2014 at 7:40am
Even though this thread is pretty old, I still wanted to say thanks for this :) It helped a ton



Print Page | Close Window