Hello..
  i'm a new user of "iReports" and i face the following problem:
I'm preparing a report and the SUMMARY part of the ouput shud get me the
SUM of values of the FIELD NAME "ACT_LIAB1" only when the field
"PROD_SUB_TYPE" = "ACD"..This is one particular condition.
How do i go about this..?
  I approached in the following manner and 'am getting errors which 'am not
able to resolve:


My Approach:
--------------------
   My filename is "custnew.xml"
  Suppose if i create a new VARIABLE in the VALUES FORM and give the
following INITIAL VALUE EXPRESSION in it(where the Calculation type is
"SYSTEM" , variable type is "java.lang.double", and i maintain a GROUP with
a specific GROUP NAME):

 (($F{PROD_SUB_TYPE}.toString().equals("ACD")) ? (new java.lang.Double(
$V{sum_varSumCustgfcid}.doubleValue() +=                     $F{ACT_LIAB1}
.doubleValue())) : (new java.lang.Double($V{sum_varSumCustgfcid}
.doubleValue())))



Errors Displayed after compiling in iReports:
----------------------------------------------------------------

       C:\jdk1.3.1_01\bin\java.exe
-Dorg.xml.sax.driver=org.apache.xerces.parsers.SAXParser IReportCompiler -c
-pdf  -jdriveroracle.jdbc.driver.OracleDriver -juserBLine -jpasswdindia
-jurljdbc:oracle:thin:@163.37.3.175:1666:bline -query "select * from
r_trb_dp"  "C:\iReport-0.1.0\iReport-0.1.0\bin\custnew.xml"

File:  C:\iReport-0.1.0\iReport-0.1.0\bin\custnew.xml

Compiling to file... C:\iReport-0.1.0\iReport-0.1.0\bin\custnew.jasper

Warning : Element bottom reaches outside band area : y=11 height=23
band-height=20

dori.jasper.engine.JRException: Errors were encountered when compiling
report expressions class file:
C:\iReport-0.1.0\iReport-0.1.0\bin\custnew.java:222: unexpected type
required: variable
found   : value
                value = (java.lang.Double)
(((((java.lang.String)field_PROD_SUB_TYPE.getValue()).toString().equals
("ACD")) ? (new java.lang.Double
(((java.lang.Double)variable_sum_varSumCustgfcid.getValue()).doubleValue()
+= ((java.lang.Double)field_ACT_LIAB1.getValue()).doubleValue())) : (new
java.lang.Double(((java.lang.Double)variable_sum_varSumCustgfcid.getValue
()).doubleValue()))));
^
C:\iReport-0.1.0\iReport-0.1.0\bin\custnew.java:470: unexpected type
required: variable
found   : value
                value = (java.lang.Double)
(((((java.lang.String)field_PROD_SUB_TYPE.getOldValue()).toString().equals
("ACD")) ? (new java.lang.Double
(((java.lang.Double)variable_sum_varSumCustgfcid.getOldValue()).doubleValue
() += ((java.lang.Double)field_ACT_LIAB1.getOldValue()).doubleValue())) :
(new java.lang.Double
(((java.lang.Double)variable_sum_varSumCustgfcid.getOldValue()).doubleValue
()))));
^
C:\iReport-0.1.0\iReport-0.1.0\bin\custnew.java:718: unexpected type
required: variable
found   : value
                value = (java.lang.Double)
(((((java.lang.String)field_PROD_SUB_TYPE.getValue()).toString().equals
("ACD")) ? (new java.lang.Double
(((java.lang.Double)variable_sum_varSumCustgfcid.getEstimatedValue
()).doubleValue() += ((java.lang.Double)field_ACT_LIAB1.getValue
()).doubleValue())) : (new java.lang.Double
(((java.lang.Double)variable_sum_varSumCustgfcid.getEstimatedValue
()).doubleValue()))));
^
3 errors


     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!
======================================================================

In the above error message, i don't understand what it means by "required:
variable" and "found: value".
cud u plzzz help me in this regard???

Thanx & Regards,
Anuradha.



This e-Mail may contain proprietary and confidential information and is sent for the 
intended recipient(s) only. 
If by an addressing or transmission error this mail has been misdirected to you, you 
are requested to delete this mail immediately.
You are also hereby notified that any use, any form of reproduction, dissemination, 
copying, disclosure, modification,
distribution and/or publication of this e-mail message, contents or its attachment 
other than by its intended recipient/s is strictly prohibited.

Visit Us at http://www.polaris.co.in

Reply via email to