PDA

View Full Version : How to get the default parameter value when using with beanShell?



bliss
07-20-2012, 06:48 AM
How to get the default parameter value when using with beanShell? (subreport)
I am using the version 3.8

1.I have create Parameter 'SortOrder' with Default Value=asc in parent report.
2.Create Scriptable - beanshell in subreport
.........
.........
String strSorting = null;
try{
strSorting = (String)dataRow.get("SortOrder");
}catch(Exception e){

}
.........
.........
It return null value (suppose it return default value asc).

Taqua
07-20-2012, 07:42 AM
Did you pass the parameter to the subreport? Subreports are isolated from the master report and unless you explicitly pass values from the master- into the sub-report, the subreport will not see anything that happend in the outside world.

In your subreport, use the data-tab to find the import parameter settings.