Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Documentation for IDAPI, examples of ExecuteReport
ptrhead99
<p>I'm new to BIRT. I'm interested in using the IDAPI Web service interface to execute BIRT reports from a legacy application. When examining the WSDL for IDAPI, I see an optional OutputFormat element that I can specify. The valid type for this is STRING. However, I don't know what the set of valid values are.</p><p> </p><p>The examples I've seen specify either HTML or PDF. Are there other types ? It would be nice if I could request either a text file or a CSV file so that I can parse this output and present it to the user in a legacy manner.</p><p> </p><p>I've searched for a more-detailed SDK or API paper of IDAPI, with no luck.</p><p> </p><p>Thanks in advance for the feedback.</p>
Find more posts tagged with
Comments
grather
<p>I posted this in another thread but it helped immensely.</p><p>I have since then moved on to making the calls just calling URI for report execution.</p><p>I am using IDAPI for the no execution tasks. List of report and such.</p><p> </p><p>Hope this helps.</p><p> </p><p>
</p><p>Some example Code. Hope it helps someone else.</p><p>To get a list of Reports</p><p> </p><p> </p><p>Out on GitHub there are some extremely nice idapi-wrappers</p><p><a class="bbc_url" href="
https://github.com/puckpuck/idapi-wrapper"
; title="External link">
https://github.com/p...k/idapi-wrapper</a></p><p> </p><p>Looks
like someone at Actuate keeps this up. Thank you.</p><p> </p><p>with this code. to get a list of Reports from the iHub3 server</p><p> </p><p>two lines of code.</p><p> ActuateServer ac = new ActuateServer();
ArrayList<com.actuate.schemas.File> reportfiles = ac.getListReports("","/Applications");</p><p> </p><p>then to execute a report</p><p> </p><p> </p><p> ReportExecuter reportExecuter = new ReportExecuter("<a class="bbc_url" href="
http://localhost:8000/"
; title="External link">
http://localhost:8000/</a>"
, "Administrator", "", "Default Volume");</p><p> HashMap<String, String> parameters = new HashMap<String, String>();
parameters.put("employeeSelect", "1");</p><p> </p><p> String objId = reportExecuter.executeReport("/Applications/"+rptFullName,null,parameters );
</p><p> viewURL += "iv?__report=";
viewURL += URLEncoder.encode("/$$$Transient/", "UTF-8");
viewURL += objId + ".rptdocument&connectionHandle=";
viewURL += URLEncoder.encode(reportExecuter.getConnectionHandle(), "UTF-8");
viewURL += "&userid=" + "Administrator";
viewURL += "&password=" + "";
viewURL += "&volume=" + URLEncoder.encode("Default Volume", "UTF-8");
//String viewURL = StringUtils.escapeHtml(viewURL);</p><p> </p><p> // I use a jsp to then open this url</p><p> // But there is an openURL method I don't use that one
req.setAttribute("viewURL",viewURL);
//openURL(viewURL, req, res);</p>
ptrhead99
<p>Thank you.</p><p> </p><p>I was actually looking for something using the native IDAPI webservice interface - this looks more like mimicing/spoofing the call a browser would make.</p><p> </p><p>It's a shame that finding anything on the Actuate website takes more time than it should. I'll continue to dig ...</p>
JFreeman
<p>Hello Ptrhead99,</p><p> </p><p>Which Actuate product and version are you communicating with using IDAPI (iServer, iHub, BIRT Viewer, etc)?</p><p> </p><p>Are you wanting to use the ExecuteReport class to actually save the output document onto the Actuate BIRT iServer/iHub or are you look to download the file to the file system after the report is complete?</p>
ptrhead99
<p>We will be using Ihub3. We're looking to provide 2 means for the user to access reports. First, through the iConsole/web browser. However, in addition to this, we've been asked to allow the user invoke reports from a legacy C++ Motif application. I'm hoping to be able to execute the same reports that were built and deployed to iHub. However, I'm looking to access them through IDAPI web service calls, adjust the default format to be something more palatable to a parser (such as a CSV file or possibly an XML file), and display the parsed/processed results to the user in an exising Motif dialog. As such, I'll need to be able to access the report from the legacy app where the report request was initiated - however, once parsed, I probably won't care about it persisting very long or recalling the results.</p><p> </p><p>Thanks in advance for all of the help.</p>
JFreeman
<p>In order to obtain a CSV output through IDAPI when running a report transiently you can use the SelectJavaReportPage class in conjunction with the ExecuteReport class. ExecuteReport is called to initially run the report and the object ID returned from the ExecuteReportResponse can then be passed to SelectJavaReportPage. When executing SelectJavaReportPage the OutputFormat can be specified as "CSV" to invoke the CSV emitter when downloading the output.</p>
ptrhead99
<p>Excellent. Thank you !</p>