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!

Drill Down Options

Status
Not open for further replies.

raj0927

Programmer
Oct 8, 2010
26
US
Hi All,
Below is the method i am working on, the process is picking the dynamic selection grouping
1) I have made the four parameter namely Parameter1,Parameter2,Parameter3,Parameter4

2)Now i have used the below formula for the grouping
select {?Parameter1}
case "Organization" :Column1
case "Region" : Column2
case "Country" : Column3
case "City" : Column4
default : ' '

select {?Parameter2}
case "Organization" :Column1
case "Region" : Column2
case "Country" : Column3
case "City" : Column4
default : ' '

select {?Parameter3}
case "Organization" :Column1
case "Region" : Column2
case "Country" : Column3
case "City" : Column4
default : ' '

select {?Parameter4}
case "Organization" :Column1
case "Region" : Column2
case "Country" : Column3
case "City" : Column4
default : ' '
so i have made the 4 formulas for 4 level of grouping and groupped on these formulas.

3)so when the user Can group depending on his requirements of grouping
( For Eg: Parameter1: Oraganization ,Parameter2:region ,Parameter3:Country, Parameter4:City)

4) And also i have "Grp5" which is allways fixed( For eg Customer)

But the issue starts when i am drilling down.
How can i drill directly from organization to cutomer, drilling from grp1 to grp5 when the Grp2,Grp3,Grp4 is Null ( for eg: they select only parameter1 and other parameters are left null)
 
Please clarify whether the user would be drilling down on Group 5 to get to the details section. Or is the display of Group 5 the final view?

-LB
 
@Ibass
The USer Will be drilling down to Grp5
 
@Ibass
I mean he will be drilling down to grp5 to get detail section
 
Okay, first change your group formulas to remove the space in the default values. Then create a formula like the following and place it in the report header and suppress it:

//I'm calling your parameters {?Parm1}, etc. for brevity
stringvar array x := [{?Parm1},{?Parm2},{?Parm3},{?Parm4}];
numbervar i;
numbervar j := ubound(x);
numbervar k := 0;
for i := 1 to j do(
if x <> "" then
k := k + 1
);
k

Then unhide all group header sections, but hide the detail section. Then in the section expert->suppress->x+2 add the following formulas for the specified group header section:

//GH2:
numbervar k;
if k-3 < 0 then
drilldowngrouplevel < k-1 else
drilldowngrouplevel < 1

//GH3:
numbervar k;
if k-2 < 0 then
drilldowngrouplevel < k else
drilldowngrouplevel < 2

//GH4:
numbervar k;
if k-1 < 0 then
drilldowngrouplevel < k else
drilldowngrouplevel < 3

//GH5:
numbervar k;
drilldowngrouplevel < k

For each section also check "suppress blank section".

This assumes that users use the parms in order, i.e., the blank parms are always at the end. The user would have to choose "..." for the blank parms.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top