[SOLVED]Build URL in a fex and then go directly to it
Is there a way to build an url statement within a fex and then go to that url and open it? I do want to have to click on a drill report that goes to the url.This message has been edited. Last edited by: Jay Potter,
WebFocus 8.1.5 iSeries/Windows DB2/SQL/Access Dev Studio App Studio Maintain ReportCaster
July 24, 2014, 01:53 PM
prodrigu
Jay,
Something like this.
DEFINE FILE CAR
LinkID/A128 = DECODE COUNTRY (ENGLAND 'IBI.com' FRANCE 'Google.com' JAPAN 'Yahoo.com' ELSE 'TheFamiLee.net/DEL') ;
YourLink/A512 = '<' || 'a href="http://www.' || LinkID || '">' || LinkID || '</a>';
END
TABLE FILE CAR
SUM YourLink AS 'Your Link' RETAIL_COST AS 'Retail' DEALER_COST AS 'Dealer' BY COUNTRY NOPRINT
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
-*ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
UNITS=IN, SQUEEZE=ON, ORIENTATION=PORTRAIT, GRID=OFF, FONT='ARIAL', SIZE=9,$
TYPE=DATA, COLUMN=Video, URL=YourLink,$
TYPE=DATA, COLUMN=YourLink, URL=YourLink,$
ENDSTYLE
END
Thank You for trying but, this produced a report with a drilldown. I would like to run a report the creates a URL and then opens up a browser using that URL.
WebFocus 8.1.5 iSeries/Windows DB2/SQL/Access Dev Studio App Studio Maintain ReportCaster
July 24, 2014, 08:38 PM
David Briars
The following focexec...
-* Construct URL
APP PREPENDPATH IBISAMP
DEFINE FILE GGSALES
PROTOCOL/A5 WITH SEQ_NO = 'http:';
RESOURCE/A50 = 'forums.informationbuilders.com';
URL/A60 = PROTOCOL || '//' || RESOURCE;
END
TABLE FILE GGSALES
PRINT URL
IF SEQ_NO EQ 1
ON TABLE SAVE AS SVURL
END
-RUN
-READ SVURL &URL.A60.
-* Present webpage to user.
-HTMLFORM BEGIN
<!DOCTYPE html>
<html>
<head>
<title></title>
<script language="JavaScript">
function redirect () {
window.location.href = "!IBI.AMP.URL;"
}
</script>
</head>
<body onload="redirect()">
</body>
</html>
-HTMLFORM END
...renders the FocalPoint website in the browser.This message has been edited. Last edited by: David Briars,
July 25, 2014, 06:16 AM
Ram Prasad E
Hi,
You can also use window.open() or FORM submit options to get this.