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     [REOPENED] HTML Composer: IbComposer_execute - anyone make this function work?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[REOPENED] HTML Composer: IbComposer_execute - anyone make this function work?
 Login/Join
 
Expert
posted
I followed the example on page 313 of the Designing a User Interface for a Web Application With the HTML Composer manual, Version 7 Release 7.03 and I cannot get IbComposer_execute to work.

I added a button to a blank HTML page. I created an onclick event. I added execution of IbComposer_execute in the function for this event. Saved the file. Ran the file. Clicked the button - nothing happens.

//Begin function button1_onclick
function button1_onclick(ctrl) {
IbComposer_execute('dummyabc');
}
//End function button1_onclick

This message has been edited. Last edited by: Francis Mariani,


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
Guru
posted Hide Post
Yes, I was able to get this to work. I am actually getting the values and storing them into a hidden textarea, then I pass those values into a report fex that get executed.

 //Begin function listbox2_onclick
function listbox2_onclick(ctrl) {

var values = IbComposer_getCurrentSelection('listbox2');

document.getElementById('textarea1').innerHTML=""+values;

IbComposer_execute('report1', 'report1');
}
//End function listbox2_onclick 


WebFOCUS 8.1.05
 
Posts: 496 | Registered: January 04, 2008Report This Post
Virtuoso
posted Hide Post
The manual is rather terse:

Syntax: How to Execute a Report or Chart

IbComposer_execute('reportID', ['outputTarget']);

where:

reportID
Alphanumeric

Is the unique identifier of the report or chart to execute.

outputTarget
Alphanumeric

Is the optional parameter to set the target of the output. Is one of the following:
■ The name of a frame.
■ '_blank'.
■ '_target'.
■ The name of a new window.

--------------------------------------------------------------------------------

Example: Executing a Report in a New Window

function button3_onclick(ctrl) {
IbComposer_execute('report1', 'newwin');
}



It's clear that reportID is supposed to be the ID attribute of a 'report' or 'chart' object, something locatable in the HTML DOM (as opposed to, say, the name of a fex that ultimately produces the output), and displayable/modifiable in the properties box of an object. Someone please explain, exactly what kind of object is that?
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Virtuoso
posted Hide Post
quote:
I added a button to a blank HTML page. I created an onclick event. I added execution of IbComposer_execute in the function for this event. Saved the file. Ran the file. Clicked the button - nothing happens.


The first argument of IbComposer_execute() is supposed to be the "unique identifier" (ID attribute in the property box) of a "report" or "chart" object that you have added to the page -- which would thus, in the generated code, be an ID attribute that javascript functions can locate in the DOM.

Not clear to me how to insert into a launch page a "report", that I expect to open in a new window, without its taking up real-estate on the launch page.

But if the identifier value you code is nothing more that the name of a fex, it cannot operate.
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Expert
posted Hide Post
I misread the documentation - it clearly states what the function is designed to do.


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
Expert
posted Hide Post
How does one determine the "the unique identifier of the report or chart to execute"?

I can't see any id in this line of code:

<request requestid="5" sourcetype="typeFex" targettype="iframe" targetname="iframe2" ibif_ex="app/report1.fex" IBIMR_domain="manageme/manageme.htm" IBIMR_folder="#blahblahblah" IBIMR_sub_action="MR_STD_REPORT" activereport="0" reportcolumns="" reportrealcolumns="" ibiapp_app="management"></request>


Do I specify the id of the target frame?


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
Platinum Member
posted Hide Post
Yes Francis,

The iframe 'name' attribute needs to be passed as a param to execute the request.
I got this working in a couple of reports.


  
function radio1_onclick(ctrl) {

 
 
// TODO: Add your event handler code here
//OnExecute(ctrl)
IbComposer_execute('graph1');
IbComposer_execute('graph2');
IbComposer_execute('graph3');
}




thanks
Sashanka


WF 7.7.03/Windows/HTML,PDF,EXL
POC/local Dev Studio 7.7.03 & 7.6.11
 
Posts: 103 | Registered: June 12, 2009Report This Post
Expert
posted Hide Post
Very confusing:

quote:
Function: IbComposer_execute
How to:
Execute a Report or Chart
The IbComposer_execute function executes a report or chart.
Syntax: How to Execute a Report or Chart
IbComposer_execute('reportID', ['outputTarget']);
where:
reportID
Alphanumeric
Is the unique identifier of the report or chart to execute.
outputTarget
Alphanumeric
Is the optional parameter to set the target of the output. Is one of the following:
The name of a frame.
'_blank'.


Why the optional "name of a frame" when it's the name of the frame we must put in 'the unique identifier of the report or chart to execute'?


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
Platinum Member
posted Hide Post
Yes it is kind of redundant but we can overwrite the predefined target window/frame in the request tag with this Optional frame name...for example ...if the checked radio box is PDF then run the request in new window or run it in the same frame.

  


IbComposer_execute('graph1','new');
IbComposer_execute('graph1');


}


thanks
Sashanka


WF 7.7.03/Windows/HTML,PDF,EXL
POC/local Dev Studio 7.7.03 & 7.6.11
 
Posts: 103 | Registered: June 12, 2009Report This Post
Guru
posted Hide Post
Francis,

Have a look further up your HTML page, you'll probably see one of your FORMS or controls have the following:

requests_list="5"

That form or control is the unique ID you want for the Ibcomposer_execute function.

Regards

Stuart


WebFOCUS 8.2.03 (8.2.06 in testing)
 
Posts: 253 | Location: Melbourne, Australia | Registered: February 07, 2007Report This Post
Guru
posted Hide Post
quote:
Originally posted by Francis Mariani:
Very confusing:

Why the optional "name of a frame" when it's the name of the frame we must put in 'the unique identifier of the report or chart to execute'?


The "name of the frame" is another frame that you may choose to send the report output to - over-riding the "regular" frame.

Regards

Stuart


WebFOCUS 8.2.03 (8.2.06 in testing)
 
Posts: 253 | Location: Melbourne, Australia | Registered: February 07, 2007Report This Post
Expert
posted Hide Post
Thanks for the explanations.

Sashanka, your comment about PDF is very interesting. You're suggesting we can modify the default behaviour of the Run button by deciding where to run the report depending on the selected report format. I will experiment with this, thanks.


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
Gold member
posted Hide Post
It's Funny!!!

@Francis,
We recently did an upgrade and i am currently working on the same line of code you have written in this program,i had to change the function below to fix it:
function tabSaved_onclick(ctrl)
{
// Clean up message iframe (may contain a "Saved parameters" message
$('#frmMsg').contents().find('html').html('');

// Always refresh this frame
//IbComposer_setCurrentSelection('RNDM', Math.floor(Math.random()*10000000));
document.getElementById('RNDM').value = Math.floor(Math.random()*10000000);
//if (document.getElementById('frm_saved_reports').contentWindow.document.body.innerHTML == '')
{
IbComposer_execute('frm_saved_reports','frm_saved_reports');
}
}


Had to write the IbComposer_execute('frm_saved_reports','frm_saved_reports') in place of IbComposer_execute('frm_saved_reports') to redirect the output to the Frame, else by default it was opening the frame result in the new window.

Even though the Iframe target was 'frm_saved_reports'.

This thread helped.


Webfocus 8105,8808,7703,7611, EXL2K,HTML,PDF,COMT,AHTML Info Assist+ , Reportcaster
 
Posts: 64 | Location: Toronto, Ontario | Registered: May 15, 2014Report 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     [REOPENED] HTML Composer: IbComposer_execute - anyone make this function work?

Copyright © 1996-2020 Information Builders