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

k.Herkt
Go to solution Solved by hozawa,

Recommended Posts

Hello, i have several problems while exporting my reports (Jasperserver 6.1.0) as an Excel-File.

I tried several settings and properties, but most of them did not help.

Note: i can NOT set the properties in each report, because i have to manage about 25+ reports - and future property-changes would end horrible if i have to set them in each report ...
So i tried to use the 'jasperreports.properties' in the 'apache-tomcatwebappsjasperserverWEB-INFclasses' folder
and the 'applicationContext.xml' in the 'apache-tomcatwebappsjasperserverWEB-INF'

What do i need?
Short form: something like the CSV exporter does ==> no font colors, no wierd column or row size changes
but i cannot use the CSV exporter, because the encoding does not work for french characters, Umlaute and so on (example: 'Erlöse')
SOLUTION for CSV:  net.sf.jasperreports.export.csv.write.bom=true
setting:

net.sf.jasperreports.export.character.encoding=ISO-8859-1net.sf.jasperreports.default.xls.encoding=ISO-8859-1net.sf.jasperreports.default.xlsx.encoding=ISO-8859-1net.sf.jasperreports.default.csv.encoding=ISO-8859-1[/code]

in 'jasperreports.properties' did not help

Long form:
 * i would like to disable all kind of formatting (ignore the report specific formatting):
all fonts are black,
all fonts use the same size (in contrast to the normal PDF report)
 * no column or row merging


current settings in jasperreports.properties:

net.sf.jasperreports.export.xls.column.width=100net.sf.jasperreports.export.xls.collapse.row.span=truenet.sf.jasperreports.export.xls.remove.empty.space.between.columns=falsenet.sf.jasperreports.export.xls.ignore.cell.background=truecom.jaspersoft.jrs.export.xls.paginated=false[/code]

and the 'applicationContext.xml':

    <bean id="xlsExportParameters" class="com.jaspersoft.jasperserver.api.engine.jasperreports.common.XlsExportParametersBean">
        <property name="detectCellType" value="false"/>
        <property name="onePagePerSheet" value="false"/>
        <property name="removeEmptySpaceBetweenRows" value="true"/>
        <property name="removeEmptySpaceBetweenColumns" value="true"/>
        <property name="whitePageBackground" value="false"/>
        <property name="ignoreGraphics" value="true"/>
        <property name="collapseRowSpan" value="false"/>
        <property name="ignoreCellBorder" value="true"/>
        <property name="fontSizeFixEnabled" value="false"/>
        <property name="maximumRowsPerSheet" value="0"/>
        <property name="xlsFormatPatternsMap" ref="formatPatternsMap"/>
    </bean>
 

thanks for help

 

 


 

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Thank you very much.
This seems to be a good workaround for me.

Is there still a way to set a "default" font and font color for the XLS exporter?
This default setting should overrule the settings in the report because:
 * Some of my reports are using WHITE as font color (some headers), if you export them as XLS you wont see much, because the cells are also white.
 * I also would like to use ONE font size for the XLS export (like the CSV export), even if my report contains several sizes (e.g 12, 16 and 24 with bold)

thank you

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