Jump to content
Changes to the Jaspersoft community edition download ×

variable values always null in report group


2004 IR Help

Recommended Posts

By: Frank Worsley - fworsley

variable values always null in report group

2005-04-25 10:12

Hi,

 

I have a report with two groups and several variables.

 

In the Details band the variables have the correct values, but in the report groups they always evaluate to null.

 

How can I make the variables have the correct value in the groups?

 

The variables have reset type 'Report', but I tried with reset type 'Group' and it still didn't work.

 

All three of the variables have an expression similiar to this:

 

$P{GELSPOT_ID} != null ? $P{GELSPOT_ID} :

($F{sourceclassname} == null ? new Long(-1) :

($F{sourceclassname}.equals("GelSpot") ? $F{sourceid} : null))

 

I use subreports to recursively search up a hierarchy in the database. What I do with the variables is to check if I have previously found an item in the hierarchy. In that case the parameter is non-null and I keep its value. Otherwise I check if the item exists at the current level of the hierarchy and pull out its ID if it does. Otherwise I leave the value as null or as -1 if I've reached the top of the hierarchy.

 

Thanks for any help,

 

- Frank

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