Jump to content
We've recently updated our Privacy Statement, available here ×

Exporting Reports in XML format


yskripch

Recommended Posts

Hello,

 

I am running JasperServer 3.0 and I would like to be able to have my users download the reports in xml format. On the documentation it says that JasperServer supports xml output format but it does not say how I can add the functionality to the JasperServer. I have found the necessary files that need to be edited so that the necessary buttons and functionality is added, but I do not know how to invocate the xml exporter.

I have attached the files that I believe need to be edited so that JasperServer can use the xml exporting function. If anybody has any ideas how this can be done please let me know. Thanks.

Link to comment
Share on other sites

  • 2 weeks later...
  • Replies 8
  • Created
  • Last Reply

Top Posters In This Topic

I just tried that and excel saved it as an xml spreadsheet. The way I would like to have the report look is like the following:

 

<Title> Report 1

</Title>

<data> stuffstuffstuffstuffstuff

stuff stuff stuffstuff

</data>

So this can be easily parsed based on the identifiers between the < >. This was possible in jasper decisions.

Link to comment
Share on other sites

  • 1 month later...

Gabriel is right. You can add a XML exporter to the screen. This takes Spring configuration work. Have a look at the xlsExportParameters bean in WEB-INF/applicationContext.xml. You may need to create a Java class like com.jaspersoft.jasperserver.api.engine.jasperreports.common.XlsExportParametersBean. This can be included in scheduled reporting too.

 

 

Sherman

Jaspersoft

Link to comment
Share on other sites

  • 9 months later...

Hello,

I'm trying feed an ajax charting widget with jasper report data, but I've searched around and found no simple way of getting Jasperserver to deliver reports in XML format, which I found surprising.  I saw an atrticle about building a custom XML exporter, but it semed to require I build the server from source.  I saw this post which seems to indicate that I can get xml output by configuring the xlsExportParametersBean.  I looked at it but it's not clear how it should be modified or if the custom class you mentioned is required of if Spring config is all that's needed.

I really don't want to have to build Jasperserver to do this and am looking for any alternative.  Ideally just some simple config, but I don't mind writing Java if it can be built independently.  Was thinking of a simple servlet that calls the jasper Java API (or something) to get data and then formats as XML.

Any suggestions?

Thanks.

 

Link to comment
Share on other sites

  • 1 month later...

What I said was that the XML export from the screen can be done with some Java coding and JasperServer configuration, with the xlsExportParametersBean as a guide.

 

You probably want a web service call just to get the XML generated by a report. Again this will require some coding changes in the web services API to allow an XML output format.

 

 

Sherman

Jaspersoft

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...