Jump to content
Changes to the Jaspersoft community edition download ×

Use fields as default value expression for parameters


Recommended Posts

I recently migrated from using iReport on Windows to using Jaspersoft Studio 6.6.0. After finding my way around most of the changes, I got all my reports working, except for one thing. In iReport, I used to create a parameter, then under its properties, I would set the default expression value to be a field. That way when the query runs, it will assign this value to the parameter, and this value would be passed to subreports. In Jaspersoft Studio, that option is not available.  (am unable to append a screenshot to illustrate this). The only options available on the left panel when I click th icon to set default expression value are:

  1. Parameter
  2. Resources
  3. Built in Functions
  4. User defined expressions
  5. Recent expressions

Even variables are not shown in the options.

How to I get the fields option back?


Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

I see what you have mentioned. Jasper reports does not allow that feature. (ireports would have had that feature). 

Since the parameters control the datasource, I dont think you would be able to fetch a value from the datasource to fill a parameter in Jasper. 

The workaround would be to create a subreport/table element and then fill the Field value from the main datasource. 

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