I want to add a default value as javascript for a report parameter so I did the following (in the eclipse birt designer):

The problem I have is: when I deploy the app (that contains the report) the javascript is not evaluated:
However, when I preview the report in the birt report designer it evaluates the javascript default value:

Here is the code that I use (filtered to have only the relevant stuff):
IReportRunnable design = getReportRunnable(pathToTemplate);
IRunAndRenderTask task = _birtReportEngine.createRunAndRenderTask(design);
task.setRenderOption(options);
task.getAppContext().put(EngineConstants.APPCONTEXT_CLASSLOADER_KEY, ReportEngine.class.getClassLoader());
task.setParameterValues(parameters);
task.validateParameters();
task.run();
The question is: did I miss something? Should I add an option somewhere that forces the evaluation of the default javascript expression?
The code you show is the code for creating and rendering a report but it’s not the code for displaying the parameter form.
Are you using the Birt-Webviewer or a self developed Web App?
In the latter case and if you retrieve the default parameter values per
org.eclipse.birt.report.engine.api.IScalarParameterDefn.getDefaultValue(), the javascript expression will not be evaluated.To get default paramater values with expressions evaluated you have to use the engine task IGetParameterDefinitionTask and there the method
org.eclipse.birt.report.engine.api.IGetParameterDefinitionTask.getDefaultValue(IParameterDefnBase arg0).