Difference between revisions of "BPS 1135 BIRT AllowExpressionDefaultValue FeatureSpecification"

From Eclipsepedia

Jump to: navigation, search
(New page: == 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 fo...)
 
(BIRT Designer)
 
Line 7: Line 7:
  
 
* BIRT Scripting - Currently the report parameter script supports following events - "validate'. The parameter scripting will be enhanced to support following additional methods
 
* BIRT Scripting - Currently the report parameter script supports following events - "validate'. The parameter scripting will be enhanced to support following additional methods
a) getDefaultValueList()
+
**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
// 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
 
+
b) 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==
 
==BIRT Engine==

Latest revision as of 18:57, 5 May 2009

Contents

[edit] Introduction

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

[edit] 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

[edit] 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.

[edit] 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.