It's all about the answers!

Ask a question

[closed] Can I programmatically export a Report Builder report?


1
1
Jackie Albert (1.6k14947) | asked Apr 27 '16, 1:21 p.m.
closed Sep 12 '23, 3:56 a.m. by David Honey (1.8k17)
 We have users moving from Rational Insight to use the JRS Report Builder, however they are missing a few of the basic functions such as being able to snapshot a report at a point in time, or email report results to a group of people.  
I understand these functions are not available, but we can export a report to Excel.  It seems like it might be a feasible workaround to programmatically export the report via Excel - are there API's available to do this, or some way we could offer this capability? 

The question has been closed for the following reason: "The question is answered, right answer was accepted" by davidhoney Sep 12 '23, 3:56 a.m.

Accepted answer


permanent link
Steven Shaw (55113) | answered May 19 '16, 3:31 p.m.
FORUM MODERATOR / JAZZ DEVELOPER
 Hi Jackie,

Yes there is, and it's just a variation of the URL that you would use to view a report.

If you are viewing a report is has a URL as follows:

<server>:<port>/rs/reports#view=<id>  where ID is a unique integer, server is where your application is installed and port is the port where the application is accessible from.

To access the excel API you need to call the following URL:

<server>:<port>/rs/reportdefinition/<id>/export/excel/static where server, port and id are the same as the URL where you viewed the report.

Alternatively you can replace "static" with "live" to get a live version of the report that can refreshed from within the Excel application.

Note: these api's are different then ones exposed in the Excel export page which also includes the query ID.  The query ID is internal and would be difficult to derive.  These URL's are also valid but achieve the same result.  The api's above are much more easily derivable.

Hope that helps,

-Steve
Jackie Albert selected this answer as the correct answer

Comments
Steven Shaw commented May 19 '16, 3:33 p.m.
FORUM MODERATOR / JAZZ DEVELOPER

 oh yeah - sorry for the slow response ...


Steven Shaw commented May 19 '16, 3:41 p.m.
FORUM MODERATOR / JAZZ DEVELOPER

Also if we want to get fancy, you could tag the reports you want to do the automatic export on, then use the following API to get a JSON representation of those reports that is used in the explorer view:


<server>:<port>/rs/explore/rows?show=reportdefinition&visibility=all&tag=<ExportTag> where "ExportTag" is the tag you used to tag the particular reports you want to export.  This api will return a JSON structure of those reports where one of the fields is "index".  This index field would be used as the ID in the excel export API.

Good luck!


thimmaiah aa commented Sep 12 '23, 1:58 a.m. | edited Sep 12 '23, 2:03 a.m.

 Hello,


Is this API  "<server>:<port>/rs/reportdefinition/<id>/export/excel/static " still valid for 7.0.2? We tried using this and unable to export the report. Please let us know if we have any other API for the same.


Ralph Schoon commented Sep 12 '23, 2:06 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Please create your own question, potentially referring to this question. Please do not post answers with your own questions to questions. This is especially true, if the question was already correctly answered, the answer was accepted and the question and answer is very old. Thank you. 


David Honey commented Sep 12 '23, 3:55 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Note that the APIs referenced here are private undocumented APIs. Report Builder does not have any public REST APIs.

One other answer



permanent link
Reem Kadadihi (1316) | answered Oct 10 '17, 6:59 a.m.

Hello,

is there any way to get the result of a report in JSON Structure?


Comments
Rosa Naranjo commented Sep 12 '18, 5:03 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
Hello
try posting your question in its own original forum post, if you have not done so already in order to get a response.