el_axtos Posted May 27, 2010 Share Posted May 27, 2010 Hello,I have a report uploaded into JasperServer and running this via webservices and export it to Excel. If this export runs by passing the ReportUnit, parameters and the format to the WSClient.runReport method I directly get an Excel file but in the export the title part is missing. But if I run the WSClient.runReport by just passing the ReportUnit and parameters, I get back an JasperPrint object which I export by using the JExcelApiExporter the report looks just like it is designed.Has anyone an idea why this happens? Am I missing some kind of parameter or something else?Thanks in advanceChrisPost Edited by el_axtos at 06/10/2010 08:29 Link to comment Share on other sites More sharing options...
lucianc Posted June 10, 2010 Share Posted June 10, 2010 JasperServer uses a set of Excel export parameter values that differ from the JasperReports one (which are used when you export the JasperPrint object in your application). Take a look at the xlsExportParameters bean in applicationContext.xml and change the parameters according to your requirements.Regards,Lucian Link to comment Share on other sites More sharing options...
el_axtos Posted June 15, 2010 Author Share Posted June 15, 2010 hi,thank you for your quick answer. I've tried to add / change those properties to try which one causes this problem. But if I make any changes in the applicationContext.xml the Tomcat is not able to start JasperServer.I added the configuration of the Exporter Bean and pictures of the correct export from JasperReports and the export with the missing title part from JasperServer. I have no idea which property I have to set. I read through the following webpage but I did not find any property which may solve the problem. I also tried to export the report to PDF and there is no problem.http://jasperreports.sourceforge.net/config.reference.htmlThanks in advanceChris Code: [/code] Link to comment Share on other sites More sharing options...
lucianc Posted June 17, 2010 Share Posted June 17, 2010 Try the following parameters.HTH,LucianCode:<bean id="xlsExportParameters" class="com.jaspersoft.jasperserver.api.engine.jasperreports.common.XlsExportParametersBean"> <property name="detectCellType" value="true"/> <property name="onePagePerSheet" value="false"/> <property name="removeEmptySpaceBetweenRows" value="true"/> <property name="removeEmptySpaceBetweenColumns" value="true"/> <property name="whitePageBackground" value="false"/> <property name="ignoreGraphics" value="false"/> <property name="collapseRowSpan" value="false"/> <property name="ignoreCellBorder" value="false"/> <property name="fontSizeFixEnabled" value="true"/> <property name="maximumRowsPerSheet" value="0"/> <property name="xlsFormatPatternsMap" ref="formatPatternsMap"/> </bean> Link to comment Share on other sites More sharing options...
el_axtos Posted June 18, 2010 Author Share Posted June 18, 2010 Hi,thanks for your help. I've changed these attributes but I still get the same output. Link to comment Share on other sites More sharing options...
tmochan Posted June 18, 2010 Share Posted June 18, 2010 Yesterday I upgraded our development server to JasperServer 3.7 CE (from 3.5) and ever since, I have had exactly the same problem. Reports that worked fine exporting to Excel in the previous version, still display OK in the web interface, but when actually exporting to XLS, miss out the "Column Header" band. Haven't tested this with other bands yet, but wonder el_axtos if you are also using this band? Link to comment Share on other sites More sharing options...
tmochan Posted June 18, 2010 Share Posted June 18, 2010 Have now tested this using a "Group Header" band, and the fields do display in Excel output for this. However this doesn't solve the problem, as I can't put the required fields there. Lucian, has something changed since 3.5 to cause this? Can it be put back? Thanks. Link to comment Share on other sites More sharing options...
el_axtos Posted June 22, 2010 Author Share Posted June 22, 2010 Hi, no I'm using the Page Header Band. But where did you find this Group Header? I can't find it. Thanks Link to comment Share on other sites More sharing options...
el_axtos Posted June 24, 2010 Author Share Posted June 24, 2010 Hi,found a solution. If I put the labels to the title band i get them with the excel export. This is working for me.Thanks for your help.Kind regardsChris Link to comment Share on other sites More sharing options...
lucianc Posted July 1, 2010 Share Posted July 1, 2010 tmochanWrote: Reports that worked fine exporting to Excel in the previous version, still display OK in the web interface, but when actually exporting to XLS, miss out the "Column Header" band. To change that, edit WEB-INF/classes/jasperreports.properties and comment the net.sf.jasperreports.export.xls.exclude.origin.band.* properties.HTH,Lucian Link to comment Share on other sites More sharing options...
jabee Posted July 6, 2010 Share Posted July 6, 2010 Hi..What if the problem in the exported excel file is the date in the page header? For example, in the report, the date is 06 July 2010,but when you export it to excel,The date now becomes 06 J 2010? Any suggestions on this one?Thanks in advanceJabee Link to comment Share on other sites More sharing options...
lucianc Posted July 7, 2010 Share Posted July 7, 2010 jabeeWrote: For example, in the report, the date is 06 July 2010, but when you export it to excel, The date now becomes 06 J 2010? That's an entirely different case.Set detectCellType to false (see the previous messages for details on where to do this) if you want Excel exports to contain the exact texts from the report. Note that it would imply that all text fields are exported as text cells (and not numerical or date).Regards,Lucian 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