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:
- Parameter
- Resources
- Built in Functions
- User defined expressions
- Recent expressions
Even variables are not shown in the options.
How to I get the fields option back?
1 Answer:
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 I don't think its an issue with the perspective.
Kindly refer to this Stackoverflow question that includes images.
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.