October 09, 2006, 01:50 PM
ETLProgControlling Drilldown Hyperlink
Hi guys and gals.
I’m trying to create a drilldown report that calls itself. I have run into a problem; when the report reaches the lowest level you can drill down on, I want to display a different title (I’m drilling down on the title). I’ve tried to use When Statement but it doesn’t seem to be working correctly; or I’m not using correct syntax. Below is a snippet of code that I’ve tried. Can any point in the correct direction here?
Thanks
TYPE=HEADING,
BORDER=LIGHT,
BORDER-STYLE=RIDGE,
BORDER-COLOR=RGB(51 51 153),
SIZE=12,
BACKCOLOR=RGB(198 211 236),
STYLE=BOLD,
TARGET='_blank',
JUSTIFY=CENTER,
FOCEXEC=app/l2c49znz(ParentGeoKey = '&ParentGeoKey' StartDate = '&StartDate' EndDate = '&EndDate' LevelFlag = 'DLVL2'),
WHEN = &LVLCOUNT LE 3,
$
TYPE=HEADING,
WHEN = &LVLCOUNT LT 0,
BORDER=LIGHT,
BORDER-STYLE=RIDGE,
BORDER-COLOR=RGB(51 51 153),
SIZE=12,
BACKCOLOR=RGB(198 211 236),
STYLE=BOLD,
JUSTIFY=CENTER,
WHEN = &LVLCOUNT GT 3,
October 09, 2006, 05:19 PM
Tony AWhy not try it using dialogue manager to skip those parts that you don't want?
TYPE=HEADING,
BORDER=LIGHT,
BORDER-STYLE=RIDGE,
BORDER-COLOR=RGB(51 51 153),
SIZE=12,
BACKCOLOR=RGB(198 211 236),
STYLE=BOLD,
JUSTIFY=CENTER,
-IF &LVLCOUNT GT 3 THEN :No_Drill;
FOCEXEC=app/l2c49znz(ParentGeoKey = '&ParentGeoKey' StartDate = '&StartDate' EndDate = '&EndDate' LevelFlag = 'DLVL2'),
TARGET='_blank',
-:No_Drill
$
T
October 10, 2006, 05:22 PM
ETLProgI've tried to use that syntax and I'm getting an error that says there is a unknown command in the stylesheet. I've also played around with the syntax and keep getting the error. Can anybody help me out with the syntax on this?
Thanks guys
October 11, 2006, 03:24 AM
Tony AHere is an example of it working. I've set a variable (&Cnt) to increment by 1 each time the fex is drilled into. I've then set the dialogue manager test to by pass the drilldown when the variable is greater than 3, so you will only ever get 3 reports from where you can drilldown.
-DEFAULT &Cnt = 0
-SET &Cnt = &Cnt + 1;
TABLE FILE CAR
SUM RCOST
DCOST
BY COUNTRY
BY CAR
BY MODEL
HEADING
"Click here to drilldown"
ON TABLE SET STYLE *
TYPE=HEADING,
BORDER=LIGHT,
BORDER-STYLE=RIDGE,
BORDER-COLOR=RGB(51 51 153),
SIZE=12,
BACKCOLOR=RGB(198 211 236),
STYLE=BOLD,
JUSTIFY=CENTER,
-IF &Cnt GT 3 THEN :No_Drill;
FOCEXEC=newfex-1(Cnt=&Cnt),
TARGET='_blank',
-:No_Drill
$
ENDSTYLE
END
-RUN
T
October 11, 2006, 11:03 AM
ETLProgThat helped a bunch! Thanks!