Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 191444

Summary: Expressions in report design should use a new syntax to differentiate them from static strings
Product: z_Archived Reporter: David Michonneau <dmichonneau>
Component: BIRTAssignee: Birt-ReportEngine-inbox <Birt-ReportEngine-inbox>
Status: CLOSED INVALID QA Contact:
Severity: enhancement    
Priority: P3 Keywords: plan
Version: 2.2.0   
Target Milestone: 2.2.1   
Hardware: All   
OS: All   
Whiteboard:

Description David Michonneau CLA 2007-06-07 06:08:16 EDT
It has now become a usability issue for report designers to input expressions 
or strings in the various input boxes of the UI. Typically if the user needs to 
input a string, he will not quote it, and it will result as an error at runtime 
if the engine was expecting an expression there.

It is also a performance issue to parse and evaluate string constants with the 
JS engine, when it is not needed.

To remedy to those problems, we need a new syntax for expression using a = sign 
as a prefix, so it can be clearly identified as an expression and not a simple 
string.

Required changes are as follows:

UI :
Expression builder needs to prepend = to the expression written by the user 
upon exit  (unless it was already there in the expression, but we  shouldn't 
assume it nor require it)

Engine:
Engine will parse expressions differently: if it starts with = it will evaluate 
the reminder of the expression as before. If it doesn't start with =, it will 
assume a string constant without quotes (or number constant if it is expecting 
a numeric value). It shouldn't run any JS evaluation or parsing in that case, 
in order to improve performance.

Model:
To ensure backward compatibility, model should replace old expressions in old 
designs with the new syntax using = as prefix. Expressions as quoted strings 
should be replaced with the same string without quotes
Comment 1 David Michonneau CLA 2007-06-08 02:18:49 EDT
bug submitted twicie unexpectedly. cancelling it (the original one is bug191445)
Comment 2 David Michonneau CLA 2007-06-15 08:18:04 EDT
closed