Jump to content

Recommended Posts

Posted

Hi all,

I am using jasper studio 5.5 and I have a variable in my main report. So I want to know that, Is it possible to pass main report variable to a sub dataset…?

If it possible, please share with me - how we can pass the variable to a sub dataset…?

Thanks!

Jo

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted

You can pass values from main report variables to a sub dataset through parameters. It requires two steps to do this:

1) create a parameter ($P{x}) in your sub dataset with the same data type as the variable ($V{y}) date type you want to pass

2) in the report component (table, list, charts, etc) using the sub dataset, add the parameter in the sub dataset to pass the values $V{y} through $P{x}

Parameter: x

Expression: $V{y}

This will pass variable y to sub dataset through its parameter x at the run time when report component is called.

Posted

thanks tchen for your response..But this method is not working for me..while compiling the report it throw an error 'Variable not found' (the report is working normally with out passing variable method).But i want the report with passing variable..

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