Focal Point
[SOLVED]Conditional Hyperlink for Excel Output

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

June 04, 2015, 09:15 AM
ElizabethN
[SOLVED]Conditional Hyperlink for Excel Output
Does anybody know how to define condition on a hyperlink depending on output?
My report is defined to have multiple output formats: html, active html and excel.
  
ON TABLE PCHOLD FORMAT &WFFMT.(<HTML Web Document (HTML),HTML>,<HTML Active Report (AHTML),AHTML>,<Excel XLSX (XLSX),XLSX>).Select type of display output.
  

I have defined hyperlinks in that report but I only want to show them in html outputs.
I want to use WHEN condition.
I have tried following approach but the syntax is wrong, I am not sure what the correct one is:
  
TYPE=DATA,
     COLUMN=VF_APP_SEQ_EVENT_PROD.EVENT_COMMENT.EVT_COMMENT,
     WHEN=VF_APP_SEQ_EVENT_PROD.EVENT_COMMENT.EVT_COMMENT EQ 'View Comments' AND  &WFFMT NE XLSX,
     DRILLMENUITEM='Event Comments',
          FOCEXEC=IBFS:/WFC/Repository/Liquent_Reports/Ad-hoc/Application_Event_Sequence_Ad_Hoc/commentDrilldown.fex( \
     ENTITY_ID=VF_APP_SEQ_EVENT_PROD.VF_APP_SEQ_EVENT_PROD.EVENT_ID \
     ),
          TARGET='_blank',


Thank you whoever responds.

This message has been edited. Last edited by: ElizabethN,


WebFOCUS 7.6
Windows, All Outputs
June 04, 2015, 09:36 AM
Tomsweb
Perhaps you can use dialogue manager goto logic to run specific blocks
Of code. Or consider use of htmltable and !IBI.fil .

Good luck


Tomsweb
WebFOCUS 8.1.05M, 8.2.x
APP Studio, Developer Studio, InfoAssist, Dashboards, charts & reports
Apache Tomcat/8.0.36
June 04, 2015, 09:42 AM
Rifaz
-DEFAULTH &WFFMT='HTML';
-SET &EXCELCOMMENT=IF &WFFMT EQ 'HTML' THEN '' ELSE '-*';
TABLE FILE CAR
SUM SALES SEATS
BY COUNTRY BY CAR
BY MODEL
ON TABLE PCHOLD FORMAT &WFFMT
ON TABLE SET STYLE *
TYPE=DATA, COLUMN=COUNTRY,
&EXCELCOMMENT.EVAL URL='http://www.google.com',
$
ENDSTYLE
END  



-Rifaz

WebFOCUS 7.7.x and 8.x
June 04, 2015, 09:50 AM
j.gross
quote:
WHEN=VF_APP_SEQ_EVENT_PROD.EVENT_COMMENT.EVT_COMMENT EQ 'View Comments' AND &WFFMT NE XLSX


First off, the syntax of the WHEN expression follows that of DEFINE or COMPUTE expressions, so (assuming WHEN will accept a compound condition), you'd need to put &WFFMT and XLSX in quotes. As it stands, both would be interpreted as referring to columns of the report.

If that still fails, you need add a COMPUTE, NOPRINT column, and reference that in the WHEN phrase:

COMPUTE DRILL_IND/I1=VF_APP_SEQ_EVENT_PROD.EVENT_COMMENT.EVT_COMMENT EQ 'View Comments' AND &WFFMT.QUOTEDSTRING NE 'XLSX'; NOPRINT

...

TYPE=DATA,
COLUMN=VF_APP_SEQ_EVENT_PROD.EVENT_COMMENT.EVT_COMMENT,
WHEN=DRILL_IND NE 0,
...,$


- Jack Gross
WF through 8.1.05
June 05, 2015, 06:36 AM
eric.woerle
The when command will allow for only one condition. You will need to do some thing like this

  type=data,
focexec = drill,
when=fieldA eq 'html',
$
Type=data,
focexec=drill,
when=fieldA NE 'html',
$


I'm typing on my pjone, so please forgive the shorthand.


Eric Woerle
8.1.05M Gen 913- Reporting Server Unix
8.1.05 Client Unix
Oracle 11.2.0.2