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     Running a Managed Reporting Standard Report using APIs

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Running a Managed Reporting Standard Report using APIs
 Login/Join
 
Silver Member
posted
Hi,

I was referring to WebFOCUS API Developer's Reference Version 7 Release 1.3 for
running a standard report. The document has a piece of code which does that.

We have a parameter driven report which we would like to run using APIs. Can you
provide me with some code to run this parameter-driven report?

Cheers,
Mohan
 
Posts: 33 | Registered: August 28, 2006Report This Post
Expert
posted Hide Post
Hi Mohan,

Can you please let us know, what API(s) are you looking at? Have you considered about using WebServices in this case? If I can know a little more about what you are looking for, I will be more than happy to make further suggestions.

Cheers, Smiler

Kerry


Kerry Zhan
Focal Point Moderator
Information Builders, Inc.
 
Posts: 1948 | Location: New York | Registered: November 16, 2004Report This Post
Silver Member
posted Hide Post
Hi Kerry,

I was referring to the API documentation that came along with the product. We have a need to build a custom jsp page which in turn picks the report parameters from a database table and run the report. Hence, we were referring to the jsp code provided in the API documentation.
The code for running a Standard Report as provided in the documentation is this:


String cgiLocation =
application.getInitParameter("webfocus_client_root")+File.separator+"web"
+File.separator+"cgi";
//Obtain a random number
double random =Math.floor((Math.random()*100000));
//Convert double into a String
String rdm = Double.toString(random);
//Create a request and response object
WFApplicationRequest workerReq = new WFApplicationRequest();
WFResponse workerResp = new WFServletResponse( response );
//Instantiate the WFServletVariableTableExtension to add name/value pairs
to the request
WFServletVariableTableExtension wfSVTExtension = new
WFServletVariableTableExtension( request, application );
//Sign-on to Managed Reporting
workerReq.addParameter( "IBIMR_action", "MR_SIGNON" );
workerReq.addParameter( "IBIMR_user", "admin" );
workerReq.addParameter( "IBIMR_pass", "admin" );
workerReq.addParameter( "IBIMR_returntype", "XML" );
WFWorkerUtil.processRequest( cgiLocation, workerReq, workerResp,
wfSVTExtension, null ,null, null );
//Reinitialize the request with the previous response cookies and obtain
all MR Domains
workerReq.Initialize( workerResp.getCookies() );
workerReq.addParameter( "IBIMR_action", "MR_RUN_FEX" );
workerReq.addParameter("IBIMR_sub_action", "MR_STD_REPORT");
workerReq.addParameter("IBIMR_fex", "app/test.fex");
workerReq.addParameter("IBIMR_folder", "#appdomain");
workerReq.addParameter("IBIMR_domain", "untitled/untitled.htm");
workerReq.addParameter("IBIMR_random", rdm);
//workerReq.addParameter( "IBIMR_returntype", "XML" );
WFWorkerUtil.processRequest( cgiLocation, workerReq, workerResp,
wfSVTExtension, null ,null, null );
%>

Because, we have a need for a parameter-driven report, we would like to have a similar piece of code which runs a report with parameters. Especially, I would like to know the corresponding workerReq.addParameter() function that does the job.

Cheers,
Mohan
 
Posts: 33 | Registered: August 28, 2006Report This Post
Expert
posted Hide Post
Hi Mohan,

Can you please try this:
workerReq.addParameter( "PARMNAME", "PARMVALUE" );

For example:

workerReq.addParameter( "COUNTRY", "ENGLAND" );

Our internal expert reviewed your code and strongly recommends to use the WebServices API. It is better documented and has better examples. Based on the WebFOCUS release you are using, the following manual on WebFOCUS Web Services may be of interest:

WebFOCUS Web Services 7.1.3

Hope this helps. Smiler

Cheers,

Kerry


Kerry Zhan
Focal Point Moderator
Information Builders, Inc.
 
Posts: 1948 | Location: New York | Registered: November 16, 2004Report This Post
Silver Member
posted Hide Post
Hi Kerry,

Thanks for your response. We were able to run the parameterized report using the API method you have provided.

Thanks again...

Cheers,
Mohan
 
Posts: 33 | Registered: August 28, 2006Report 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     Running a Managed Reporting Standard Report using APIs

Copyright © 1996-2020 Information Builders