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

Specifying Export Parameters


vickirk

Recommended Posts

Hi,

I'm struggling to get to grips with specifying export parameters to create a xls document in the desired format.  I have teh following in my jrxml.

<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="device-detail" language="groovy" pageWidth="1000" pageHeight="842" columnWidth="1000" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" isIgnorePagination="true">
    <property name="net.sf.jasperreports.export.xls.remove.empty.space.between.columns" value="Boolean.TRUE"/>
    <property name="net.sf.jasperreports.export.xls.remove.empty.space.between.rows" value="Boolean.TRUE"/>
    <property name="net.sf.jasperreports.export.xls.ignore.cell.border" value="Boolean.TRUE"/>
    <property name="net.sf.jasperreports.export.xls.detect.cell.type" value="Boolean.TRUE"/>

However these are just being ignored, if I go into tools/option/Export Options in iReport and check the relevant boxes it works as expected.  However I need the reports to be self conatined, I can't rely on the relevant config items been set, the report is going to be deployed to various environments. 

Am I missing something obvious (I've tried just 'true' instead of Boolean.TRUE?



Post Edited by vickirk at 07/20/2010 21:38
Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

I'll try rephrasing this, concentgrating on my immediate problem, hopefully making it easier for an answer.

Can someone provide me steps to add to a jrxml source file so that te report (reliablbly) creates an excel file where sub reports are added as seperate worksheets.  I have this going in iReport if I set the excel export options in Tools/Options, but not by adding properties to the report.

The report is going to be deployed under a number of different web apps/environments and many installations of those, so I can't rely on config specified outside of the compiled jasper, the conifg would clash with other reports and would mean updating a lot of environments, also teh web apps are bespoke and have no support for providing per reort config.

Kind Regards, Vic

 



Post Edited by vickirk at 07/22/2010 07:32
Link to comment
Share on other sites

Just in case anyone searches and finds this I've identified the issue.

 

After looking in the code iReport always sets PROPERTY_ONE_PAGE_PER_SHEET, thus rendering any mention of net.sf.jasperreports.export.xls.one.page.per.sheet in my report redundant, the setting is though picked up when executed programmatically.

 

It would be nice if iReport only specified this property if the user elected to specify a value, of course this would mean it would have to be able to track whether the user set the value that happens to be the default or they had just not set it.

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