Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CASE-OPENED] HTML prompts and fex

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CASE-OPENED] HTML prompts and fex
 Login/Join
 
Member
posted
Hello All,

Newbie here. First time poster long time listener. I am sure I'll get a few nice comments Wink. I searched the forum found several things but I think too much to make my head spin. I have a nice fex that has prompts but dont like the hard coding dates for years, months, etc. I have a nice javascript that I put into an html that will populate the last 7 years, the 12 months and days; defaults to current date and whenever a change is made it changes the days in line with the month, more dummy proof.
Can and how can I get the fex to call the html. I have read several things for this on here and have attempted but seem to be missing something (-HTMLFORM BEGIN -HTMLFORM END and referring to it HTMLFORM file.htm statement in a fex). My ultimate goal is to use this date parameter for most of our jobs since we rely heavily on dates. The fex does most of the work for other criteria required.FYI I am only spitting out a EXL2K file at this time on all the reports we do at this time.

-SET &ECHO='ALL';
SET ASNAMES=ON


-PROMPT '&STRRUNYEAR.(2011,2012,2013,2014,2015,2016,2017,2018).Run Year.';
-PROMPT '&STRRUNMONTH.(01,02,03,04,05,06,07,08,09,10,11,12).Run Month.';
-PROMPT 'STRRUNDAY.(01,02,03,04,05,06,07,08,09,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31).Run Day.';
-PROMPT '&ENDRUNYEAR.(2011,2012,2013,2014,2015,2016,2017,2018).End Run Year.';
-PROMPT '&ENDRUNMONTH.(01,02,03,04,05,06,07,08,09,10,11,12).End Run Month.';
-PROMPT 'ENDRUNDAY.(01,02,03,04,05,06,07,08,09,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31).End Run Day.';

-PROMPT '&DISPFORMAT.().Report Format.';

DEFINE FILE U_AGENCY
MAINAGCY/A10 = EDIT(MAIN_AGENCY_NO,'9999999999');
START_DT_FMT/YYMD = HDATE(START_DATE, 'YYMD');
START_D1/A8YYMD = START_DT_FMT;
START_D2/A8MDYY = START_DT_FMT;
START_YEAR/A4 = EDIT(START_D1,'9999$$$$');
END


TABLE FILE U_AGENCY
PRINT
AGENCY_NO
AGENCY_NAME AS 'MSTRAGENCYNAME'
AGENCY_TYPE AS 'MSTRAGENCYTYPE'
STATUS AS 'MSTRAGENCYSTATUS'
-*AGENCY_NO
PUBLISH_CODE AS 'MSTRAGENCYPUBCODE'
HO_CONTACT_LF_DESC AS 'MSTRMAINW_REGION'
START_DT_FMT AS 'MSTRAGYSTARTDT'
START_D2 AS 'MSTRAGYSTART'
START_YEAR AS 'MSTRAGYSTARTYR'
REG_DESCRIPT
BY MAINAGCY
WHERE CURRENT_IND EQ 'Y';
WHERE MAINAGCY EQ AGENCY_NO;
ON TABLE HOLD AS UH_AGENCY1 FORMAT FOCUS INDEX MAINAGCY
END
-RUN

DEFINE FILE U_AGENCY
START_DT_FMT/YYMD = HDATE(START_DATE, 'YYMD');
START_D1/A8YYMD = START_DT_FMT;
START_D2/A8MDYY = START_DT_FMT;
START_YEAR/A4 = EDIT(START_D1,'9999$$$$');
END


TABLE FILE U_AGENCY
PRINT
AGENCY_NO
AGENCY_NAME AS 'AGENCYNAME'
AGENCY_TYPE AS 'AGENCYTYPE'
STATUS AS 'AGENCYSTATUS'
MAIN_AGENCY_NO
PUBLISH_CODE AS 'AGENCYPUBCODE'
HO_CONTACT_LF_DESC AS 'MAINW_REGION'
START_DT_FMT AS 'AGYSTARTDT'
START_D2 AS 'AGYSTART'
START_YEAR AS 'AGYSTARTYR'
BY AGENCY_NO
WHERE CURRENT_IND EQ 'Y';
ON TABLE HOLD AS UH_AGENCY2 FORMAT FOCUS INDEX AGENCY_NO
END
-RUN

DEFINE FILE U_AGT_PERFORMANCE
AGENCY_NO1/A10 = EDIT(AGENCY_NO,'9999999999');
PROCESS_DT_FMT/YYMD = HDATE(PROCESS_DATE, 'YYMD');
PROCESS_D1/A8YYMD = PROCESS_DT_FMT;
PROCESS_YEAR/A4 = EDIT(PROCESS_D1,'9999$$$$');
PROCESS_MONTH/A2 = EDIT(PROCESS_D1,'$$$$99$$');
END

TABLE FILE U_AGT_PERFORMANCE
PRINT
PRODUCT_LINE_DESC
PROCESS_MONTH
PROCESS_YEAR
PROCESS_DATE
PAYMENT_TYPE_DESC
PREMIUM_CREDIT AS 'PREM_CREDIT'
PRODUCT_LINE
PRODUCTION_CREDIT AS 'PROD_CREDIT'
STATISTIC_TYPE
BY AGENCY_NO1
WHERE STATISTIC_TYPE EQ '2';
WHERE PROCESS_DATE GE DT (&STRRUNYEAR-&STRRUNMONTH-&STRRUNDAY 00:00:00) AND PROCESS_DATE LE DT (&ENDRUNYEAR-&ENDRUNMONTH-&ENDRUNDAY 23:59:59);
WHERE PREMIUM_CREDIT NE '0';
ON TABLE HOLD AS PERFOUTPUT1 FORMAT FOCUS INDEX AGENCY_NO1
END
-RUN



JOIN AGENCY_NO1 IN PERFOUTPUT1 TO AGENCY_NO IN UH_AGENCY2 AS J870

DEFINE FILE PERFOUTPUT1
END

TABLE FILE PERFOUTPUT1
SUM
PREM_CREDIT
BY MAIN_AGENCY_NO AS 'MAIN_AGCY1'
BY PRODUCT_LINE_DESC
BY PRODUCT_LINE
BY PROCESS_MONTH
BY PROCESS_YEAR
BY PAYMENT_TYPE_DESC
ON TABLE HOLD AS PERFOUTPUT2 FORMAT FOCUS INDEX MAIN_AGENCY_NO
END
-RUN


JOIN MAIN_AGCY1 IN PERFOUTPUT2 TO MAINAGCY IN UH_AGENCY1 AS J871

DEFINE FILE PERFOUTPUT2
END

TABLE FILE PERFOUTPUT2
SUM
PREM_CREDIT
BY MAIN_AGCY1
BY MSTRAGENCYNAME
BY MSTRAGYSTARTYR
BY MSTRAGENCYSTATUS
BY MSTRMAINW_REGION
BY REG_DESCRIPT
BY PRODUCT_LINE_DESC
BY PRODUCT_LINE
BY PROCESS_MONTH
BY PROCESS_YEAR
BY PAYMENT_TYPE_DESC
ON TABLE HOLD AS SALES
END
-RUN
//Then I start printing 6 EXL2K Reports from here, didn't include

Thanks

Austin

This message has been edited. Last edited by: <Kathryn Henning>,


Version: 7703 - Gen: 126 , Windows 7, Excel, PDF and html
 
Posts: 2 | Location: Cincinnati, Ohio | Registered: May 09, 2013Report This Post
Virtuoso
posted Hide Post
-HTMLFORM file.htm


That is exactly the syntax you'd use to invoke an HTML file (and have it loaded in the browser) from within a .fex.

All really has to do with where both your .fex and HTML file are located.

If both files are in the Reporting Server and same app folder, all your need is to run:
-HTMLFORM myfile.htm.


If the HTML file is in a different app folder, just prefix the name with the folder:
-HTMLFORM myappfolder/myfile.htm


When dealing with the MRE, just prefix your HTML file name with "app/":
-HTMLFORM app/myfile.htm


Similarly, if found in a domain different than that where your .fex is, then do:
-HTMLFORM mydomain/app/myfile.htm



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Member
posted Hide Post
I tried -HTMLFORM myfile.htm last week and nothing was responding. They are both located on the same server and app folder. This morning it seems to be responding. Now to get the parameters to pass back to the fex.

Thanks

Austin


Version: 7703 - Gen: 126 , Windows 7, Excel, PDF and html
 
Posts: 2 | Location: Cincinnati, Ohio | Registered: May 09, 2013Report This Post
Gold member
posted Hide Post
Hi AustinM

If you cannot get an answer open a case in Tech Support and we will assist you.

Thanks Barry


WebFOCUS 8103, Windows, App Studio
 
Posts: 80 | Location: NYC | Registered: November 13, 2008Report This Post
Expert
posted Hide Post
An example of HTML code that passes variables to a fex. This is hand-written code, not the stuff that HTML Composer generates.

pass variable


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CASE-OPENED] HTML prompts and fex

Copyright © 1996-2020 Information Builders