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

Missing part at Excel-export via WebServices


el_axtos

Recommended Posts

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 advance
Chris



Post Edited by el_axtos at 06/10/2010 08:29
Link to comment
Share on other sites

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

Top Posters In This Topic

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

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.html

Thanks in advance

Chris

Code:
                                                                                        [/code]			
Link to comment
Share on other sites

Try the following parameters.

HTH,

Lucian

Code:
<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

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

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

tmochan
Wrote:

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

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 advance



Jabee

Link to comment
Share on other sites

jabee
Wrote:

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

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...