Jump to content

Style using return variable bug/setting problem


SeanDay

Recommended Posts

Hi,

 

I have a subreport that returns a variable to the parent report. The sub report is in the detail section and I want to use the value returned to style the field/row. I have setup a style and an expression to do this but the style is being applied to the line after the one I want changed.

 

 

e.g. Style expression set to

 

 

new Boolean($V{TOTAL_V} > 0)

 

 

and the row below the one greater than zero is being styled..

 

I can get this to work using a normal field in the report but it appears the style is being applied before the variable is being evaluated. Is this a bug or a setting problem?

 

Thanks,

 

Sean

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

I have tried this in version 2.0.5 of iReports and it still does not work, it looks like the style is evaluated before the value is returned from the sub report..

 

 

Is this the way iReports/Jasper Reports are designed to work or am I missing a setting (I always have trouble working out what to put for the evaluation time setting. :unsure:

 

 

Sean

Link to comment
Share on other sites

  • 2 years later...

 This happens even in the latest version -- is it true you cannot use Variables in style expressions, when that variable is populated by a sub-report called in the detail band?

#Edit: 

Solved by placing this at the report level:

<property name="net.sf.jasperreports.style.evaluation.time.enabled" value="true"/>

 


Post Edited by jmesterh at 10/06/2010 18:41
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...