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. Moving forward, myibi is our community platform to learn, share, and collaborate. We have the same Focal Point forum categories in myibi, so you can continue to have all new conversations there. If you need access to myibi, contact us at myibi@ibi.com and provide your corporate email address, company, and name.


Connect to myibi
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED]Pass fex variable to javascript variable of HTML composer

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED]Pass fex variable to javascript variable of HTML composer
 Login/Join
 
Member
posted
Can I pass the value of fex variable to javascript variable of HTML composer ?

If "YES", explain me how to do with sample code.

Please help me.

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


WebFOCUS 8.1.05M
Windows, Excel , CSV Outputs
 
Posts: 8 | Registered: November 28, 2017Report This Post
Platinum Member
posted Hide Post
You can take a control on your HTML page and bind that control using the fex file.
And using java script can retrieve that controls value


WF Production :- WF:8.0.0.4, 8.1.05 App-studio/Developer Studio(8.1.x) ,
8.2.0.1M , 8.2.0.2 (App-Studio8.2.x),
InfoAssist/+, InfoDiscovery
Output format:-AHTML, PDF, Excel, HTML
Platform:-Windows 7, 8,10
 
Posts: 186 | Location: Infobuild India | Registered: August 28, 2015Report This Post
Member
posted Hide Post
Thanks for your reply.

What I want to do is that I want to pass &RECORDS or &LINES to the HTML Composer after run the report.

Although I bind the fex file with my HTML composer, I can't find the &RECORDS or &LINES in parameter tag.

So, how can I retrieve like these values from the js of HTML composer ?


WebFOCUS 8.1.05M
Windows, Excel , CSV Outputs
 
Posts: 8 | Registered: November 28, 2017Report This Post
Platinum Member
posted Hide Post
you can try like this and bind your HTML control with LINECOUNT

 TABLE FILE CAR
BY  CAR.COMP.CAR
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET ASNAMES ON
ON TABLE NOTOTAL
ON TABLE HOLD AS LINECNT

END
-SET &LIN = &LINES;


TABLE FILE LINECNT
SUM COMPUTE LINECOUNT/D20 = &LIN;
CAR NOPRINT
ON TABLE PCHOLD AS LINECNT
END


WF Production :- WF:8.0.0.4, 8.1.05 App-studio/Developer Studio(8.1.x) ,
8.2.0.1M , 8.2.0.2 (App-Studio8.2.x),
InfoAssist/+, InfoDiscovery
Output format:-AHTML, PDF, Excel, HTML
Platform:-Windows 7, 8,10
 
Posts: 186 | Location: Infobuild India | Registered: August 28, 2015Report This Post
Platinum Member
posted Hide Post
you can try this also if you don't have any where clause in your table file request ,

 
DEFINE FILE CAR 
CNT/D20 = CNT+1;
END

TABLE FILE CAR
SUM
MAX.CNT AS LINECOUNT
CAR.COMP.CAR NOPRINT
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET ASNAMES ON
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT XML
END
 


WF Production :- WF:8.0.0.4, 8.1.05 App-studio/Developer Studio(8.1.x) ,
8.2.0.1M , 8.2.0.2 (App-Studio8.2.x),
InfoAssist/+, InfoDiscovery
Output format:-AHTML, PDF, Excel, HTML
Platform:-Windows 7, 8,10
 
Posts: 186 | Location: Infobuild India | Registered: August 28, 2015Report This Post
Member
posted Hide Post
Thanks for your suggestion. But I need to try another way for my report. Sweating


WebFOCUS 8.1.05M
Windows, Excel , CSV Outputs
 
Posts: 8 | Registered: November 28, 2017Report This Post
Guru
posted Hide Post
  
TABLE FILE CAR
BY COUNTRY
ON TABLE HOLD
END
-SET &MYLINES = &LINES;

-HTMLFORM mycomposer.htm


Then in your composer file include the variable like this:
var lines = "!IBI.AMP.MYLINES;";


You can also use it in properties, not only javascript.


Test: WF 8.2
Prod: WF 8.2
DB: Progress, REST, IBM UniVerse/UniData, SQLServer, MySQL, PostgreSQL, Oracle, Greenplum, Athena.
 
Posts: 454 | Location: Europe | Registered: February 05, 2007Report 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     [CLOSED]Pass fex variable to javascript variable of HTML composer

Copyright © 1996-2020 Information Builders