yskripch Posted September 12, 2008 Share Posted September 12, 2008 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 More sharing options...
gabrielinux Posted September 24, 2008 Share Posted September 24, 2008 Not sure how to do this, but you can always export to HTML or Excel, both of which can be easily converted to XML. Link to comment Share on other sites More sharing options...
yskripch Posted September 25, 2008 Author Share Posted September 25, 2008 So, How would I convert Excel or HTML to XML format? Would I need to write a script to do that or is there a plugin available somewhere? Thanks. Link to comment Share on other sites More sharing options...
gabrielinux Posted September 26, 2008 Share Posted September 26, 2008 In Excel, just go to File -> Save As and change the File Type to XML. It's that simple. :) Pretty much every spreadsheet software nowadays can save to XML. Link to comment Share on other sites More sharing options...
yskripch Posted September 26, 2008 Author Share Posted September 26, 2008 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> stuffstuffstuffstuffstuffstuff 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 More sharing options...
gabrielinux Posted September 26, 2008 Share Posted September 26, 2008 I'm not sure then... I've never used Jasper Decisions. :( You might have to create your own exporter that manipulates the data in the way you want it. Just curious, why can't your users use CSV? What exactly are you trying to do with the XML file once you have it? Link to comment Share on other sites More sharing options...
swood Posted October 29, 2008 Share Posted October 29, 2008 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. ShermanJaspersoft Link to comment Share on other sites More sharing options...
scrollpane Posted August 21, 2009 Share Posted August 21, 2009 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 More sharing options...
swood Posted October 3, 2009 Share Posted October 3, 2009 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. ShermanJaspersoft Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now