Focal Point
want to have multiple conditions in a drill down

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/2471087331

June 30, 2004, 07:00 PM
<levada>
want to have multiple conditions in a drill down
Hi,
I have a report and depending on 2 different fields I want to do different drill downs. So for instance if field a = 1 then I want to call report joe while if field b=2 then I want to call report frank and furthermore if the count field is 0 then I dont want to call any reports.
Somebody please email me elliot.siegel@juliusbaer.com
June 30, 2004, 09:34 PM
RB
Hi,

On the drill down pass two parameters a and b to the REPORT that you want to drill down on.
in REPORT
set a condition as
SET &STEP = IF a EQ I THEN REPORT1 ELSE IF b EQ 2 THEN REPORT2;
GOTO &STEP
-REPORT1
TABLE FILE YYY
...


..
END
-EXIT
-REPORT2
TABLE FILE ZZZ
...


..
END
-EXIT

Hope this helps you.
July 01, 2004, 10:35 AM
Tony A
levada,

Try using the drillmenu item within the style -

TYPE=type, [subtype], DRILLMENUITEM='description'|'DrillDown n', type_of_link

As far as I know you can use this with a WHEN condition.

If you do not want multiple menu items when clicking on a link then just use the WHEN conditioning -

TABLE FILE CAR
PRINT DCOST
RCOST
BY COUNTRY
BY CAR
ON TABLE SET STYLE *
TYPE=DATA, COLUMN=N1, WHEN=COUNTRY EQ 'FRANCE', $
TYPE=DATA, COLUMN=N1, WHEN=COUNTRY EQ 'ENGLAND', FOCEXEC=joe, $
TYPE=DATA, COLUMN=N1, WHEN=COUNTRY EQ 'JAPAN', FOCEXEC=frank, $
ENDSTYLE
END
July 01, 2004, 01:14 PM
<WFUser>
Use a WHEN condition in your stylesheet.

TYPE=DATA,COLUMN=P1,FOCEXEC=joe,WHEN=A EQ 1,$
TYPE=DATA,COLUMN=P1,FOCEXEC=frank,WHEN=B EQ 2,$

The WHEN fields jow and frank must exist in your request but you can NOPRINT them if you want. You also must make sure both conditions cannot be true. They they are, you'll probably get the second one.
July 03, 2004, 03:36 PM
susannah
i agree with WFuser. The style sheet WHEN= syntax is the way to go here.
You can have 3 entries for tht field
the two that Wfuser suggests, plus a third
for your no-drilldown option
TYPE=DATA,COLUMN=P1,WHEN=MYCOUNTFIELD EQ 0,$
and you'll get no hyperlink at all.