• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JasperReports -- excel issue

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The .excel version of my report seems

a) not to recognize number formats (defined them as BigDecimal -- I have already set the JRXlsExporterParameter.IS_DETECT_CELL_TYPERXlsExporterParameter.IS_DETECT_CELL_TYPE property to TRUE, but no luck !)

b) not to recognize the functions/formula.

In my report, I am using a crosstab, which displays totals in its last row from the defined measures.

For instance, my actual_degree_qtyMeasure is defined as follows (exerpt from .jrxml):

<measure name="ACTUAL_DEGREE_QTYMeasure" class="java.math.BigDecimal" calculation="Sum">
<measureExpression><![CDATA[$F{ACTUAL_DEGREE_QTY}]]></measureExpression>
</measure>

The total $V{actual_degree_qtyMeasure} is defined as follows in the .jrxml

<textField>
<reportElement style="Crosstab Data Text" mode="Opaque" x="0" y="-29" width="25" height="29" backcolor="#CCCCFF"/>
<textElement verticalAlignment="Middle">
<font size="7"/>
</textElement>
<textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{ACTUAL_DEGREE_QTYMeasure} == null ? "0" : $V{ACTUAL_DEGREE_QTYMeasure}]]></textFieldExpression>
</textField>

Now, when I generate the excel file, the numbers are printed in the cells, but they are recognized as "general" format, not numbers, and obviously if I increase one of these data, the totals do not change.

Any help, please ?



 
author
Posts: 3285
13
Mac OS X Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Version of Jasper? Version of Excel you're aiming to export for?
 
Grazia Lassner
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
JasperReports 3.7.1
Excel 2007
 
Grazia Lassner
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
JasperReports 3.7.1 uses POI 3.5
 
Martijn Verburg
author
Posts: 3285
13
Mac OS X Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't use these products but from what I've read in these forums the versions of libs you're using should make what you're trying to do possible. Is it that you're defining it as a <textField>?
 
Grazia Lassner
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I generated teh sample report "Groups" that comes with iReports 3.7.1, and the data you can see are rendered as Currency, and the total in "Total freight in this country" gives the correct total, but it is no longer a updatable formula that reflects the changes in the data it is supposed to sum.
I wonder whether there is a bug in 3.7.1
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic