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.
I was wondering if anyone would happen to have example code of the Report Caster API being called from HTML Composer.
I have read all topics on the forum (about the API), studied the Report Caster on steroids presentation and went through the Report Caster API documentation but I don't see any examples of using the API from within Developer Studio. I was able to run the batch files to create the Report Caster API samples but I am not sure how to call them. I think the next step is to create a JSP file (that calls the samples) that is called from HTML composer. But I am not completely sure how to proceed.
Can anyone point me in the right direction?
Your help is greatly appreciated.This message has been edited. Last edited by: <Kathryn Henning>,
I don't know about the report caster api, but to get to report caster you can do the following. This may be good enough for your users:
1. Create form 2. create hyperlink for run button 3. right click form add schedule button.
When the button is pressed it goes straight to report caster populating your report. If needed, you can probably configure RC to your needs if this is going to be a common practice.
WebFOCUS 7.7.03/8.0.08 Dev Studio 7.7.03/8.0.08 App Studio 8.0.08 Windows 7 ALL Outputs
Posts: 402 | Location: Upland, IN | Registered: June 08, 2012
Unfortunately we can not use the single page scheduling tool. Basically when they hit save the scheduling will work off of a scheduling paramater on the page.
Thank you,
Elizabeth
quote:
Originally posted by J: I don't know about the report caster api, but to get to report caster you can do the following. This may be good enough for your users:
1. Create form 2. create hyperlink for run button 3. right click form add schedule button.
When the button is pressed it goes straight to report caster populating your report. If needed, you can probably configure RC to your needs if this is going to be a common practice.
Yes! We want to trigger ReportCaster from the web page without showing the scheduling tool. We will be building the logic for the scheduling on the backend.
I just need to be able to capture the paramaers and to create a schedule when the user clicks a button.
Thank you,
Elizabeth
quote:
Originally posted by J: Are you trying to setup something automatic so that they don't even need to go to the RC scheduling page?
this should get you started (open rc window and close when done automatically):
//Begin function button1_onclick
function button1_onclick(ctrl) {
rcWindow = window.open("caster/schedule/editor/index.jsp");
var int = window.setInterval(function(){
//wait for page to load
if(rcWindow.frames.length){
//wait for workframe to load
if(rcWindow.frames[0].id='workFrame'){
var rcDoc = rcWindow.frames[0].document;
if(rcDoc.readyState) {
window.clearInterval(int);
alert(rcDoc.readyState);
//do your stuff
rcWindow.close();
}
}
}
},100);
}
//End function button1_onclick
This type of coding may be considered sort of a hack. If this is not ideal I would open up a case.
WebFOCUS 7.7.03/8.0.08 Dev Studio 7.7.03/8.0.08 App Studio 8.0.08 Windows 7 ALL Outputs
Posts: 402 | Location: Upland, IN | Registered: June 08, 2012
Thank you. This helped me be able to begin testing accessing the jsp pages. I am still trying to make this seemless to the users. So will need to be able to pass paramter from the HTML page to the Report Caster API.
Thank you,
Elizabeth Cosain
quote:
Originally posted by J: this should get you started (open rc window and close when done automatically):
//Begin function button1_onclick
function button1_onclick(ctrl) {
rcWindow = window.open("caster/schedule/editor/index.jsp");
var int = window.setInterval(function(){
//wait for page to load
if(rcWindow.frames.length){
//wait for workframe to load
if(rcWindow.frames[0].id='workFrame'){
var rcDoc = rcWindow.frames[0].document;
if(rcDoc.readyState) {
window.clearInterval(int);
alert(rcDoc.readyState);
//do your stuff
rcWindow.close();
}
}
}
},100);
}
//End function button1_onclick
This type of coding may be considered sort of a hack. If this is not ideal I would open up a case.
I would strongly suggest following fernando's advice as I said this was sort of "hackish" but if you really need to get this out there, then just get the user's inputted values yourself and populate the RC page.
Using the supported HTML Composer javascript API functions makes this a little easier (IbComposerGetCurrentSelection, etc.)This message has been edited. Last edited by: J,
WebFOCUS 7.7.03/8.0.08 Dev Studio 7.7.03/8.0.08 App Studio 8.0.08 Windows 7 ALL Outputs
Posts: 402 | Location: Upland, IN | Registered: June 08, 2012
you can easily build a jsp and java classes to call the REPORT CASTER Jar files to implement the scheduling functionality, Please refer the report caster API document from the webfocus tech support website. It has very good samples
I have gone through the RC API documentation many many times. I was able to create the sample files on our server. There are 2 JSP files that come with the examples but they don't use any of the funtionality I need. I opened a case with tech support but they recommended the use of servlets (which I think is stabalized so I don't want to go down that road). I was hoping someone had an example of a JSP that ran or created a schedule from within HTML composer. I have not been able to find one.
Thank you for your response.
Elizbeth Cosain
quote:
Originally posted by Rakesh P: you can easily build a jsp and java classes to call the REPORT CASTER Jar files to implement the scheduling functionality, Please refer the report caster API document from the webfocus tech support website. It has very good samples