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     [CLOSED]Adding Accordion Report to div through Ajax Call

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED]Adding Accordion Report to div through Ajax Call
 Login/Join
 
Master
posted
One thing thats always bugged me about accordion reports in IFrames is that when the accordion report loads, it loads minimized. Then you expand it, the IFrame doesn't expand with it and you get a scroll bar in the frame instead of for the page. This has always annoyed me so I decided I would run the fex as an AJAX call, store the results in the return variable and write it directly into the HTML of the page. I do this for many other reports, what could go wrong. Apparently if you try doing this with accordion reports, the Javascript that needs to run will overwrite your page with the header script containing the necessary JS files Mad

So, I figured out that I can use ON TABLE HOLD AS FORMAT HTMLTABLE, and then USE the HTMLFORM BEGIN/END to write out to html. Only problem is, the JS files needed for the accordion functionality don't fire off. Why would they? I just scrubbed the HTML content.

Next step was that I added the necessary JS files to the HTML page. I found that I needed these:

<script type='text/javascript'  type="text/javascript"  src='http://dlaxbiws302.apolloglobal.int:8080/ibi_apps/ibi_html/javaassist/ibi/html/js/ibijsdbg.js'></script>
<script type='text/javascript'  type="text/javascript"  src=/ibi_apps/ibi_html/javaassist/ibi/html/js/IBIEvent.js'></script>
<script type='text/javascript'  type="text/javascript"  src=/ibi_apps/ibi_html/javaassist/ibi/html/js/ibipopupdesc.js'></script>
<script type='text/javascript'  type="text/javascript"  src=/ibi_apps/ibi_html/javaassist/ibi/html/js/IBILib.js'></script>
<script type='text/javascript'  type="text/javascript"  src=/ibi_apps/ibi_html/javaassist/ibi/html/js/IBITable.js'></script>
<script type='text/javascript'  type="text/javascript"  src=/ibi_apps/ibi_html/javaassist/ibi/html/js/accordionByRow.js'></script>  


Now, I can get the accordion report to work on the initial execution of the report, but the JavaScript doesn't execute each time I rerun the report to re-initiate the accordion functionality.

Has someone been able to get something like this to work before? Does anyone know which function I could call in accordionByRow.js and maybe side step all this silliness?

Best case scenario is that the Report is captured in the Div tag of the HTML page instead of an IFrame, but if someone has a way to get the IFrame to size properly then, I'm open to that as well.

In case anyone cares, here is the jquery I use to run the report and apply it to the DIV

 var trm = IbComposer_getCurrentSelection('combobox1');
var myTrm = "'" + trm[0] + "'";
var prgrm = IbComposer_getCurrentSelection('combobox4');
var stud_status = IbComposer_getCurrentSelection('combobox5');
var stud_campus = IbComposer_getCurrentSelection('combobox2');
var chrt = IbComposer_getCurrentSelection('combobox3');

$("#rpt_apgadv1000").html("<DIV style='DISPLAY: block' id=dvLoading></DIV>");

$.ajax({
type: 'post',	
	url: 'ibi_apps/WFServlet.ibfs',
	data: {IBIMR_action: 'MR_RUN_FEX',
		 IBIMR_sub_action:'MR_STD_REPORT',
		 IBIMR_fex: '/WFC/Repository/Apollo_Global/Faculty/apgadv1000.fex',
		 TERM: myTrm ,
		 PROGRAM:prgrm[0],
		 STUDENT_STATUS:stud_status[0],
		 STUDENT_CAMPUS:stud_campus[0],
		 COHORT: chrt[0]}
	 })
.done( function(returnData){
//	alert(returnData);

	 $("#rpt_apgadv1000").html(returnData);
	 applyModal();
	});
	
} 

Any thoughts are appreciated

This message has been edited. Last edited by: <Emily McAllister>,


Eric Woerle
8.1.05M Gen 913- Reporting Server Unix
8.1.05 Client Unix
Oracle 11.2.0.2
 
Posts: 750 | Location: Warrenville, IL | Registered: January 08, 2013Report This Post
Expert
posted Hide Post
Eric, this is an absolutely remote possibility.

Take a look at Documentation > Creating Reports With WebFOCUS Language > Navigating Within an HTML Report > Controlling the Display of Sorted Data With Accordion Reports > Distributing Accordion Reports With ReportCaster

quote:

Distributing Accordion Reports with ReportCaster requires the use of JavaScript components and images located on the WebFOCUS Client. To access the JavaScript components and images from a report distributed by ReportCaster, the scheduled procedure must contain the SET FOCHTMLURL command, which must be set to an absolute URL instead of the default value. For example,

SET FOCHTMLURL = http://hostname[:port]/ibi_apps/ibi_html

where:

hostname[:port]
- Is the host name and optional port number (specified only if you are not using the default port number) where the WebFOCUS Web application is deployed.

ibi_apps/ibi_html
- ibi_apps is the site-customized web server alias pointing to the WEBFOCUS80/ibi_apps directory (where ibi_apps is the default value). ibi_html is a directory within the path to the JavaScript files that are required to be accessible when viewing an Accordion report.


The SET FOCHTMLURL command might set the appropriate JS references without you having to. I would create a text fex with an Accordion report and schedule it. Examine the HTML of the scheduled report, then try coding your HTML similarly...


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     [CLOSED]Adding Accordion Report to div through Ajax Call

Copyright © 1996-2020 Information Builders