Focal Point
[SOLVED] Hyperlink as Excel Field Value

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

October 25, 2010, 02:29 PM
ColdWhiteMilk
[SOLVED] Hyperlink as Excel Field Value
I can get a hyperlink to appear as a field value in EXL2K output, but it appears only as text.

Is there a way to make this a working (clickable) hyperlink?

DEFINE FILE CAR
BLANKER/A500 WITH COUNTRY= '';
URL/A255 = 'http://www.google.com';
END

TABLE FILE SOC_ARSCHEMA
PRINT
BLANKER AS 'BLANKER'
URL AS 'URL'

WHERE RECORDLIMIT EQ 1

ON TABLE PCHOLD FORMAT EXL2K
END
-EXIT

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


Production - 7.6.4
Sandbox - 7.6.4
October 25, 2010, 02:38 PM
dbeagan
DEFINE FILE CAR
BLANKER/A500 WITH COUNTRY= '';
URL/A255 = 'Google';
END
TABLE FILE CAR
PRINT
CAR AS 'BLANKER'
URL AS 'URL'
WHERE RECORDLIMIT EQ 1
ON TABLE PCHOLD FORMAT EXL2K
ON TABLE SET STYLE *
TYPE=DATA, COLUMN=2, URL='http://www.google.com',$
ENDSTYLE
END


WebFOCUS 8.2.06
October 25, 2010, 03:16 PM
ColdWhiteMilk
Interesting. I would not have thought to put the URL in the stylesheet.


Production - 7.6.4
Sandbox - 7.6.4
October 27, 2010, 12:27 PM
Hua
I couldn't make it work properly in my application, what is wrong with it?

DEFINE FILE CAR
BLANKER/A500 WITH COUNTRY= '';
URLink/A255 = IF COUNTRY EQ 'ENGLAND' THEN 'http://www.google.gb' ELSE 'http://www.google.com';
END
TABLE FILE CAR
PRINT
CAR AS 'BLANKER'
COUNTRY AS 'Local Google'
ON TABLE PCHOLD FORMAT EXL2K
ON TABLE SET STYLE *
TYPE=DATA, COLUMN=2, URL=URLink,$
ENDSTYLE
END

  



Developer Studio 7.6.11
AS400 - V5R4
HTML,PDF,XLS
October 27, 2010, 01:52 PM
Tom Flynn
You can't use a "field" in a URL:

  
DEFINE FILE CAR
BLANKER/A500 WITH COUNTRY= '';
END
TABLE FILE CAR
PRINT
CAR AS 'BLANKER'
COUNTRY AS 'Local Google'
ON TABLE PCHOLD FORMAT EXL2K
ON TABLE SET STYLE *
TYPE=DATA, COLUMN=N2, URL='http://www.google.gb',  WHEN= COUNTRY EQ 'ENGLAND',$
TYPE=DATA, COLUMN=N2, URL='http://www.google.com', WHEN= COUNTRY NE 'ENGLAND',$
ENDSTYLE
END
-EXIT



Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
October 27, 2010, 02:01 PM
ColdWhiteMilk
Here is basically what I wound up doing:

DEFINE FILE CAR
AUDITLINK1/A50= 'http://www.google.com/';
AUDITLINK2/A255= '<a href='||''''|| AUDITLINK1 | '''' | '>' || CAR.MODEL ||'</a>';
END

TABLE FILE CAR
PRINT
AUDITLINK2 AS 'Hyperlink Field'

ON TABLE PCHOLD FORMAT EXL2K
END



Production - 7.6.4
Sandbox - 7.6.4
October 27, 2010, 02:07 PM
Hua
ColdWhiteMilk's solution works better because all the links are coming from a file.
Thank you both.

Hua


Developer Studio 7.6.11
AS400 - V5R4
HTML,PDF,XLS