Focal Point
[SOLVED]Build URL in a fex and then go directly to it

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

July 24, 2014, 11:22 AM
Jay Potter
[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




Prod: WebFOCUS 7.7.03: Win 2008 & AIX hub/Servlet Mode; sub: AS/400 JDE; mostly Self Serve; DBs: Oracle, JDE, SQLServer; various output formats
July 24, 2014, 02:37 PM
Jay Potter
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.

Thanks,
Ram


WebFOCUS 8.1.05
Windows
http://ibiwebfocus.wordpress.com
https://www.facebook.com/groups/ibi.webfocus/
July 25, 2014, 07:09 AM
Jay Potter
Thanks for the tip. This works perfect for me.

I will use a SET command to create my parameter and copy the code from HTMLFORM BEGINS.

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