Jump to content

iReport / Filling Report never completes, 100% CPU


contentengineer

Recommended Posts

We have developed eight reports in iReport 1.3.0, and published successfully to JasperIntelligence using the plug-in.

 

Two reports fail to complete (jrxml attached) the "filling report" process; either through iReport or on JasperIntelligence. CPU rises close to 100% and memory creeps up.

 

Same problem occurs with different connections (JDTS, SunJDBC); and different output (HTML, PDF)

 

Same problem occurs if the report is built using the Wizard.

 

[sames SQL tests and completes in ~12 seconds on database server; though we notice that the connection stays open which suggests not all rows have been collected???]

 

Reports complete if we limit number of rows to less than 15 (there are 41 rows expected).

 

No special characters in rows.

 

---

 

I have seen a number of bugs/similar symptoms on the forum, but no conclusive answer yet.

 

----

 

iReport 1.3.0

JRE 1.5.0_11-b03

Windows Server 2003

Dual AMD, 4GB RAM

 

 

 

[file name=OCGVendorMTD.jrxml size=9864]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/OCGVendorMTD.jrxml[/file]

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

The report fails to complete the fill when parsing row 16. Extract from Rows 15 and 16 of DB when running SQL on server:

 

vendsearchname total_cost total_revenue

FIRST ORDER DISCOUNT 0.000000 0.000000

GENERIC PRINT VENDOR USED FOR 0.000000 0.450000

GXXXXXXX XXXXXXXX LTD 294.000000 360.200000

 

Formula for Margin%

 

( $F{total_revenue}==0.0 ? 0.0 : 1-$F{total_cost}/$F{total_revenue} )

 

[using groovy]

 

This row is not at the bottom of a column though.

Link to comment
Share on other sites

There is a problem with Groovy scriplet class and BigDecimals. IMHO the ROUND_UP assumption in the java class conversion in groovy appears to cause an infinite loop.

 

In groovy:

 

( $F{revenue}==0 ? 0 : $F{margin}/$F{revenue} )

 

In Java:

 

( $F{revenue}.intValue()==0 ? new BigDecimal("0") :

$F{margin}.divide($F{revenue}.BigDecimal.ROUND_UP )

 

solves the problem...

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