contentengineer Posted February 14, 2007 Share Posted February 14, 2007 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.0JRE 1.5.0_11-b03Windows Server 2003Dual 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 More sharing options...
contentengineer Posted February 14, 2007 Author Share Posted February 14, 2007 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_revenueFIRST ORDER DISCOUNT 0.000000 0.000000GENERIC PRINT VENDOR USED FOR 0.000000 0.450000GXXXXXXX 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 More sharing options...
contentengineer Posted February 14, 2007 Author Share Posted February 14, 2007 If the $V field is removed from the report including variable definition, the report runs through. Is there a problem with the BigDecimal calculation or compilation in groovy? Any thoughts? Link to comment Share on other sites More sharing options...
contentengineer Posted February 16, 2007 Author Share Posted February 16, 2007 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now