Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

BPS 1135 BIRT AllowExpressionDefaultValue FeatureSpecification

Introduction

The goal of the enhancement is to allow user to specify expression for the parameter default value.

BIRT Designer

The UI changes proposed for this feature can be found at https://bugs.eclipse.org/bugs/attachment.cgi?id=132515

  • BIRT parameter dialog - The parameter dialog will be enhanced to allow user to enter expression in the parameter default value. Note: When the expression builder is invoked in this context, the user has no access to 'Report parameters' and 'Available Data Sets' and ‘Available Column Bindings’ in the expression builder.
  • BIRT Scripting - Currently the report parameter script supports following events - "validate'. The parameter scripting will be enhanced to support following additional methods
    • getDefaultValueList() - User can implement this method to return default value. Based on parameter type, user can return single or multiple default values. If the parameter type is multi-value, user can return multiple default values
    • getSelectionValueList()- User can implement this method to return the value list. This method is only available if the parameter type is 'list', 'combo' control parameter type. If a user sets the default value and also implements the method, the method value overrides the value set in parameter dialog

BIRT Engine

The execution sequence for the events is fixed and it is done once.

  • During intialization of IGetParamterDefnTask - The getDefaultValue/getSelectionList() is called and the default value is evaluated one time and used subsequently when user calls engine API IGetParameterDefnTask.getDefaultValue(String name)
  • During intitalization of IRunTask/IRunAndRenderTask – The getDefaultValue/validate() is evaluated ones and used subsequently.

BIRT model

  • Enhance parameter to support validate()/getDefaultValueList()/getSelectionValueList() as script in one script segment. Those methods can share the variable and functions with each other.

Back to the top