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     ReportCaster API ¡Help!

Read-Only Read-Only Topic
Go
Search
Notify
Tools
ReportCaster API ¡Help!
 Login/Join
 
Expert
posted
Has anyone looked at the ReportCaster API manual lately? Do you find it as cryptic as I do?

I could be completely wrong, but the gist of it is that we now have to compile java programs to be able to do anything with the API. The JSP stuff that I just am now learning about is "functionally stabilized".

The manual gives great detail about every line of code, with intricate examples of how to do one tiny piece of a procedure, but I cannot find anywhere how to do the simplest thing: schedule a fex in ReportCaster, passing the program name, parameters and output format.


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
Hey Francis,

Download these in PDF for your release:

ReportCaster Development and Administration
ReportCaster End User Manual

These will help...

Tom


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Expert
posted Hide Post
Tom, these two manuals are documentation for ReportCaster, unfortunately there's nothing about how to use the API to create a schedule "on the fly".


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
My BAD!!!


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Expert
posted Hide Post
No problems!


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
Virtuoso
posted Hide Post
F, please explain "on the fly?"


"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
 
Posts: 1102 | Location: Toronto, Ontario | Registered: May 26, 2004Report This Post
Master
posted Hide Post
There should also be a set of jsp that came with report caster that give you examples. You can also download my FLEX Interface for Report Caster, it has about 4 or 5 jsp files that you can look at and see how I use them. http://www.freewebs.com/texasstingray

Tex




Scott

 
Posts: 865 | Registered: May 24, 2004Report This Post
Expert
posted Hide Post
From what I understand from the documentation, JSP is old technology, "functionally stabilized" - we should be compiling java programs.

As per wiki, on the fly means something created when needed. I am on a html form, I want to either submit the form with the WF servlet to run the program immediately, or submit the program to ReportCaster. The method I do this: I have a checkbox called "Via email". If it's checked, I replace the form action with the JSP file name and submit then form. It works fantastically. EXCEPT, I cannot do this for PDF and EXL2K and, as far as I can tell, this is OLD TECHNOLOGY. We are told in the ReportCaster manual
quote:
As of Version 4 Release 3.5, the ReportCaster API Subroutines are functionally stabilized. Information Builders recommends for Version 5.3 and higher that you use the ReportCaster API to implement all ReportCaster functionality.

This appendix is intended as a reference for users who have already developed applications using ReportCaster API Subroutines in a previous release.


I do not want to use "functionally stabilized" code for something new I'm developing. I also do not want to write java programs to do something this simple.

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
Virtuoso
posted Hide Post
F, that's not quite true. The "bean" technology is functionally stabilized, not the new API. I you grab the documentation for RCAPI for WF 76x, it does not even mention the out dated bean stuff. Just ensure you only use packages that start with "ibi.broker.api", and avoid anything that starts with "ibi.broker.beans".

The API is virtually the same for 7.6 as it is for 5.3.


"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
 
Posts: 1102 | Location: Toronto, Ontario | Registered: May 26, 2004Report This Post
Expert
posted Hide Post
Unfortunately, there is not one single example with a JSP that shows me how to submit a fex to ReportCaster, passing focexec name, report parameters, output format, email address, email subject line.

This JSP does it, apparently using beans but it can't run a PDF or EXL2K report:

<%-- $Revision: 1.2 $: --%>
<%@ page language="java" import="ibi.broker.beans.*,ibi.broker.beans.handler.*,java.util.*,java.text.*,java.io.*" %>
<jsp:useBean id="schedFact" scope="request" class="ibi.broker.beans.DSTSchedFactory" />
<%

/*
Expected parameters to be passed:
IBIF_focexec = Focexec
EMAILADDRESS = Email address of user making the DSC request
USERNAME     = Name of the user making the DSC request
T_DLRCODE    = Dealer Code
T_REPCODE    = Rep Code
T_NOOFDAYS   = Number of days
T_ALLACCT    = All Accounts Flag
T_ACCOUNT    = Account Number
FORMAT       = Report Format
*/

// Retrieve expected parameters
String IBIF_focexec = request.getParameter("IBIF_focexec");
String USERNAME     = request.getParameter("USERNAME");
String EMAILADDRESS = request.getParameter("EMAILADDRESS");
String EMAILFROM    = request.getParameter("EMAILFROM");
String EMAILSUBJECT = request.getParameter("EMAILSUBJECT");
String JOBDESC      = request.getParameter("JOBDESC");

String T_DLRCODE    = request.getParameter("T_DLRCODE");
String T_REPCODE    = request.getParameter("T_REPCODE");
String T_NOOFDAYS   = request.getParameter("T_NOOFDAYS");
String T_ALLACCT    = request.getParameter("T_ALLACCT");
String T_ACCOUNT    = request.getParameter("T_ACCOUNT");
String FORMAT       = request.getParameter("FORMAT");

Date now = new Date();
SimpleDateFormat formatter = new SimpleDateFormat( "yyyyMMdd" );

DSTAuthenticate auth = new DSTAuthenticate();

auth.setUser("xxxxxxx");
auth.setPass("zzzzzzz");
auth.setAgentProperty("gfnotoeiprod:8200");

String interval = "O";
String startdate = formatter.format(now);
String starttime = "0600";
String[] parNames  = { "T_DLRCODE", "T_REPCODE", "T_NOOFDAYS", "T_ALLACCT", "T_ACCOUNT", "FORMAT" };
String[] parValues = {  T_DLRCODE ,  T_REPCODE ,  T_NOOFDAYS ,  T_ALLACCT ,  T_ACCOUNT ,  FORMAT  };

schedFact.setAuthenticate(auth);

schedFact.setIBIB_casteruser("xxxxxxx");
schedFact.setIBIB_jobdesc(JOBDESC);
schedFact.setIBIB_active("Y");
schedFact.setIBIB_priority("3");

schedFact.setIBIB_interval(interval); //Run Once
schedFact.setIBIB_startdate(startdate);
schedFact.setIBIB_starttime(starttime);
schedFact.setIBIB_listtype(DSTSchedFactory.ADDRESSTYPE_SINGLEADDRESS); //send to one address
schedFact.setIBIB_distlist(EMAILADDRESS); // access list name
schedFact.setIBIB_method(DSTSchedFactory.METHOD_MAIL);
schedFact.setIBIB_mailfrom(EMAILFROM);
schedFact.setIBIB_mailuser(EMAILFROM);
schedFact.setIBIB_mailsubject(EMAILSUBJECT);
schedFact.setIBIB_asvalue("dsc.htm");
schedFact.setIBIB_mulpart("N");

// notification
schedFact.setIBIB_notifyflag(DSTSchedFactory.NOTIFYFLAG_INACTIVE);
schedFact.setIBIB_tasktype(DSTSchedFactory.TASKTYPE_EDA_FOCEXEC);
schedFact.setIBIB_servername("EDASERVE");
schedFact.setIBIB_taskobj(IBIF_focexec); //URL being Schedled
schedFact.setIBIB_execid("qqqqqqq");
schedFact.setIBIB_execpass("rrrrrrr");
schedFact.setIBIB_sendformat(FORMAT);
//schedFact.setIBIB_sendformat(DSTSchedFactory.SENDFORMAT_HTML);

schedFact.setIBIB_paramname(parNames);
schedFact.setIBIB_paramvalue(parValues);

schedFact.setIBIB_servername("EDASERVE");
schedFact.setIBIB_deletejob("Y");

DSTBeanHandler h = schedFact.getCreateScheduleHandler();
h.processRequest();
DSTAPIStatus status = h.getAPIStatus();
int code = status.getErrorCode();
if(code != DSTAPIStatus.NO_ERROR) {
out.println("Code = " + code + "; Message = " + status.getErrorMessage());
return;

}

DSTBeanResult result = h.getBeanResult();
Vector xml = result.getXML();
String sid = null;
String stag = "<IBIB_scheduleid>";
String etag = "</IBIB_scheduleid>";
for(int i = 0; i < xml.size(); i++) {
String temp = (String)xml.elementAt(i);
int index = temp.indexOf(stag);
if(index != -1) {
int end = temp.indexOf(etag);
sid = temp.substring(index + stag.length(), end);
break;
}
}
out.println("Schedule ID = " + sid);

%>
<html>
<head>
<title>DSC Email Request</title>
</head>
<body>
<h3>DSC Email request will be processed shortly</h3>
</body>
</html>




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
Virtuoso
posted Hide Post
Give me a day or two and I'll toss you an example. I got other priorities at the moment. I might have time this afternoon to start it.


"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
 
Posts: 1102 | Location: Toronto, Ontario | Registered: May 26, 2004Report This Post
Expert
posted Hide Post
D,

Thanks very much - I don't want you to have to do the work. Why wouldn't the manual have this basic example?

Anyways, I'm off to Paris tomorrow for a week - I won't be thinking about JSP's...

Thanks very much for your help,


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
Virtuoso
posted Hide Post
See The end of this one. It still is the old API, but will solve your problem without me having to do any workSmiler


"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
 
Posts: 1102 | Location: Toronto, Ontario | Registered: May 26, 2004Report This Post
Silver Member
posted Hide Post
In the introduction to the ReportCaster API in Pages 22 - Page 24 of the ReportCaster API Developer's Reference for 761 and higher it states that the API enables developers to 'distribute reports using Web applications' and 'enables developers to use JavaServer Pages (JSP) technology'. It's true that all of the sample programs in chapter 13 (with the exception of the 2 credential jsp examples) are stand alone java programs which need to be compiled and run from the command line. What's needed is a sample application demonstrating the use of the API in JSPs. There are in fact some sample pages included in the WebFOCUS76\webapps\rcaster76\samples directory but they are not documented in this manual.


WebFOCUS All Releases
 
Posts: 45 | Location: NYC | Registered: September 21, 2007Report This Post
Expert
posted Hide Post
dhagen,

Your suggestion to add

schedFact.setIBIB_mulpart("Y");

works perfectly!

Thanks so much.

For the case I opened, Tech Support said:

"... WebFOCUS 532 has been functionally stabilized and we will not be issuing functionality enhancements for this version. However, EXL2K is not supported under any version of webfocus and ReportCaster. If you upgrade to WebFOCUS 710 or higher, you will be able to submit reports with an output format of PDF..."

"EXL2K is not supported under any version of webfocus and ReportCaster"!!! I will have to inform them of your suggestion.

Regards,


Francis


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     ReportCaster API ¡Help!

Copyright © 1996-2020 Information Builders