Use fields as default value expression for parameters

0

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?

 

ncubed940's picture
Joined: Dec 13 2018 - 11:03pm
Last seen: 11 months 4 days ago

@reportdev I don't think its an issue with the perspective.
Kindly refer to this  Stackoverflow question that includes images.

ncubed940 - 11 months 5 days ago

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. 

reportdev - 11 months 4 days ago

1 Answer:

0

If the view is different in Jasper Studio, you can reset the perspective and it should reset the entire View to defaults.

https://community.jaspersoft.com/documentation/tibco-jaspersoft-studio-u...

reportdev's picture
1222
Joined: Oct 12 2015 - 12:05pm
Last seen: 3 months 1 week ago
Feedback
randomness