Jump to content
Changes to the Jaspersoft community edition download ×

dereferenced???


ktrinad

Recommended Posts

By: J.Carlyle - jcarlyle_au

dereferenced???

2003-07-10 23:50

when I try and compile my report I get the following error msg.

 

File: D:networthExjasperreportsSTI.xml

 

Compiling to file... D:networthExjasperreportsSTI.jasper

 

D:networthExjasperreportsSTI.java:98: double cannot be dereferenced

value = (java.math.BigDecimal)(((java.math.BigDecimal)variable_income.getValue()).doubleValue().subtract(((java.math.BigDecimal)variable_expense.getValue()).doubleValue()));

^

D:networthExjasperreportsSTI.java:168: double cannot be dereferenced

value = (java.lang.Boolean)(new Boolean(((java.math.BigDecimal)variable_income.getValue()).doubleValue().subtract(((java.math.BigDecimal)variable_expense.getValue()).doubleValue()) > 0));

^

D:networthExjasperreportsSTI.java:193: double cannot be dereferenced

value = (java.lang.Boolean)(new Boolean(((java.math.BigDecimal)variable_income.getValue()).doubleValue().subtract(((java.math.BigDecimal)variable_expense.getValue()).doubleValue()) < 0));

^

D:networthExjasperreportsSTI.java:241: double cannot be dereferenced

value = (java.math.BigDecimal)(((java.math.BigDecimal)variable_income.getOldValue()).doubleValue().subtract(((java.math.BigDecimal)variable_expense.getOldValue()).doubleValue()));

^

D:networthExjasperreportsSTI.java:311: double cannot be dereferenced

value = (java.lang.Boolean)(new Boolean(((java.math.BigDecimal)variable_income.getOldValue()).doubleValue().subtract(((java.math.BigDecimal)variable_expense.getOldValue()).doubleValue()) > 0));

^

D:networthExjasperreportsSTI.java:336: double cannot be dereferenced

value = (java.lang.Boolean)(new Boolean(((java.math.BigDecimal)variable_income.getOldValue()).doubleValue().subtract(((java.math.BigDecimal)variable_expense.getOldValue()).doubleValue()) < 0));

^

D:networthExjasperreportsSTI.java:384: double cannot be dereferenced

value = (java.math.BigDecimal)(((java.math.BigDecimal)variable_income.getEstimatedValue()).doubleValue().subtract(((java.math.BigDecimal)variable_expense.getEstimatedValue()).doubleValue()));

^

D:networthExjasperreportsSTI.java:454: double cannot be dereferenced

value = (java.lang.Boolean)(new Boolean(((java.math.BigDecimal)variable_income.getEstimatedValue()).doubleValue().subtract(((java.math.BigDecimal)variable_expense.getEstimatedValue()).doubleValue()) > 0));

^

D:networthExjasperreportsSTI.java:479: double cannot be dereferenced

value = (java.lang.Boolean)(new Boolean(((java.math.BigDecimal)variable_income.getEstimatedValue()).doubleValue().subtract(((java.math.BigDecimal)variable_expense.getEstimatedValue()).doubleValue()) < 0));

^

9 errors

dori.jasper.engine.JRException: Errors were encountered when compiling report expressions class file:

See error messages above.

 

at dori.jasper.engine.design.JRCompiler.compileReport(JRCompiler.java:148)

 

at dori.jasper.engine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:135)

 

at dori.jasper.engine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:123)

 

at IReportCompiler.main(IReportCompiler.java:119)

 

 

 

Abnormal termination!

 

 

Can you please help me.

Thanks

 

 

 

 

By: J.Carlyle - jcarlyle_au

RE: dereferenced???

2003-07-11 00:18

I think the problem was that I was trying to convert a BigDecimal into a Double. Which is fine if you don't want to subtract.

 

 

 

 

By: Giulio Toffoli - gt78

RE: dereferenced???

2003-07-11 01:19

 

No, the problem that you make a call to the method

doubleValue() that return a double not a Double object.

 

I think that you have something like this:

 

$F{income}.doubleValue().subtract( $F{expense}.doubleValue() )

 

A right expression is:

 

new Double(

$F{income}.doubleValue(). - $F{expense}.doubleValue() )

 

Giulio

 

 

 

 

By: Giulio Toffoli - gt78

RE: dereferenced???

2003-07-11 01:20

The is a dot that is not right in my expression.

 

The right one is this:

 

new Double( $F{income}.doubleValue() - $F{expense}.doubleValue() )

 

 

 

 

By: J.Carlyle - jcarlyle_au

RE: dereferenced???

2003-07-13 16:35

Thank you very much for all your help :)

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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