Focal Point
Conditional hyperlinking in WF7.1.3

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

April 24, 2007, 03:02 AM
Shankar
Conditional hyperlinking in WF7.1.3
Hi,

How can i handle Conditional hyperlinking in WF7.1.3.
I am using Oracle 8i. My table can have zero, non-zero or NULL values in the TOTAL column. But i want to display links only for the non-zero counts. I am using following syntax which is not working and showing links for zero and null values also.
Ex:TYPE=DATA,ACROSSCOLUMN=TOTAL, WHEN=TOTAL NE NULL, FOCEXEC=mgmt_std.fex \

Please suggest.


WF 8.1.04,Windows 7,
DataBase: Oracle 11g,Output :Excel,PDF,HTML
April 24, 2007, 04:17 AM
Alan B
I believe I used to create a new computed column:

AllowDrill/A1 = IF Fld EQ 0 THEN 'N' ELSE 'Y'; NOPRINT

and then use

WHEN = AllowDrill EQ 'Y',

for the drill down, which then only puts a link on non-zero values


Alan.
WF 7.705/8.007
April 24, 2007, 04:49 AM
Shankar
quote:
values

Hi Alan,
this solution will put links on all the non-zero values, and null is also a non-zero value.
So after applying this solution, links will not appear on zero values but links will always be there for null values (i.e. blank links which looks like a hiphen(-)).
Any alternative solution please!!!


WF 8.1.04,Windows 7,
DataBase: Oracle 11g,Output :Excel,PDF,HTML
April 24, 2007, 04:59 AM
Alan B
Have you tried this? I think that as Fld is null then AllowDrill will not be evaluated and therefore not contain 'Y', and will therefore work as a screen.


Alan.
WF 7.705/8.007
April 24, 2007, 05:19 AM
Shankar
Alan,
I tried this exactly the same way as mentioned in your earlier mail. But it is creating links on null fields as well.
Also, with this approach i am facing another problem; to use ALLOWDRILL variable i need to put it in BY clause and which is not helping me in getting the exact required report display.


WF 8.1.04,Windows 7,
DataBase: Oracle 11g,Output :Excel,PDF,HTML
April 24, 2007, 05:30 AM
Alan B
It works for me. I use the AllowDrill in a COMPUTE, with a NOPRINT, not a BY. This is where it has to be for this to work.

SUM Fld
AllowDrill/A1 = IF Fld EQ 0 THEN 'N' ELSE 'Y'; NOPRINT
ACROSS A
BY B


Alan.
WF 7.705/8.007
April 24, 2007, 06:44 AM
Qalqili
Hi shankar

did you try this:-
AllowDrill/A1 = IF Fld GT 0 THEN 'Y' ELSE 'N'; NOPRINT

hope that will hilp


WF 7.7.0.3HF3 / WinXP- WF-Client & Apache / DevStd 7.7.0.3HF3 win XP.
April 24, 2007, 07:04 AM
Shankar
Hi Alan, Qalqili,
u are great!!!
The changes suggested by you are working sweetly for data links, but for subtotal and grantotal links, sometimes it creates links and sometimes it doesnt.
Any specific reason as to why this could happen.
Apart from this, I've one more question, how can I suppress a particular column if all the values in that column are zero.

Regards,
Shankar


WF 8.1.04,Windows 7,
DataBase: Oracle 11g,Output :Excel,PDF,HTML
April 24, 2007, 07:21 AM
Alan B
On the subtotal and grandtotal rows use a drill down with

TYPE=SUBTOTAL,
ACROSSCOLUMN=Fld,
FOCEXEC=MYFEX,
WHEN=Fld GT 0,

Null (missing) numeric data will be 0 for SUBTOTAL AND GRANDTOTAL values.

Suppressing a column was discussed a short time ago, can't remember the outcome, try a FIND.


Alan.
WF 7.705/8.007
April 24, 2007, 08:10 AM
Shankar
Hi Alan,
Its working perfectly fine.
Thanx a ton!!!

I'll find out the solution for
suppressing the columns.


WF 8.1.04,Windows 7,
DataBase: Oracle 11g,Output :Excel,PDF,HTML
April 24, 2007, 08:50 AM
Qalqili
Shankar

try this for supress field:-

TABLE FILE [table]
PRINT fld0
WHERE fld0 NE 0;
ON TABLE HOLD
END
-RUN
-IF &RECORDS EQ 0 THEN GOTO PROC1 ELSE PROC2;
-RUN

-PROC1
TABLE FILE [table]
PRINT fld1 fld2 fld3
-* where this procedure contains all field
-* except the Zero one
END
-EXIT
-PROC2
TABLE FILE [table]
PRINT fld0 fld1 fld2 fld3
-* Where this procedure contains all field
-* also the fld0 that contains Zero values and
-* The others values
END
-EXIT

hope that will help


WF 7.7.0.3HF3 / WinXP- WF-Client & Apache / DevStd 7.7.0.3HF3 win XP.
April 24, 2007, 11:12 AM
Shankar
Hi Qalqili,
This approcch doesnt help me as i dont know that how many columns can have all zero values.
The approach suggested by you assumes that there are already some known no. of columns which can have all zero or null values.
Any alternate solution!!!


WF 8.1.04,Windows 7,
DataBase: Oracle 11g,Output :Excel,PDF,HTML
April 24, 2007, 11:29 AM
Francis Mariani
Wouldn't something like this work?

TABLE FILE CAR
SUM
SALES 
COMPUTE DD_FLAG/I1 = IF SALES EQ 0 OR SALES IS MISSING THEN 0 ELSE 1; 
BY COUNTRY SUBTOTAL
BY CAR

ON TABLE SET PAGE NOLEAD
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLESHEET *
BORDER=1, BORDER-COLOR=SILVER,
FONT='ARIAL', SIZE=8, $
TYPE=DATA, COLUMN=SALES, FOCEXEC=CARTEST1 ( COUNTRY=COUNTRY CAR=CAR), WHEN= DD_FLAG GT 0, $
TYPE=SUBTOTAL, COLUMN=SALES, FOCEXEC=CARTEST1 ( COUNTRY=COUNTRY), WHEN= DD_FLAG GT 0, $
END



Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server