jasper reports - JasperReports: using variable in variable's expression -


i using jaspersoft studio , trying set variable value of variable (well actually, need sum of 2 variables in variable)

so have 2 variables, , b. need put in b. whenever use textfield output a, works fine. if in variable b, put ($v{a}), , try print b, null.

does have clue why happens?

report x contains subreport y returns variable

<returnvalue subreportvariable="expenditures_total_var" tovariable="expenditures_total_var" incrementerfactoryclass=""/> 

(note same variable name in both reports)

report x contains variable

<variable name="stotal_var" class="java.lang.double" calculation="sum">     <variableexpression><![cdata[$v{expenditures_total_var}]]></variableexpression> </variable> 

this works:

    <textfield>         <reportelement x="120" y="1" width="70" height="30" uuid="f0e81b0f-ddd3-4f31-9711-cfdeb64f36b2"/>         <textfieldexpression><![cdata[$v{expenditures_total_var}]]></textfieldexpression>     </textfield> 

this not:

    <textfield>         <reportelement x="310" y="1" width="100" height="30" uuid="263973e7-33b1-4343-a76c-3edbe5506d66"/>         <textfieldexpression><![cdata[$v{stotal_var}]]></textfieldexpression>     </textfield> 


Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -