During report generation, the module will write the new CSV dataset to the filesystem and then change the BIRT report design (XML) to references the new dataset. When overriding the flatfile dataset query to include the new filename, the module drops off an important part of the query which keeps track of the column data types.
The syntax for the flatfile dataset used to be a simple SQL-like query. The column data types must have been stored somewhere else in the report design.
SELECT columns FROM table
In some recent version of BIRT, the designer started tacking on the 'column_info' expression which includes the data type for every column.
SELECT columns FROM table : { column_info }
The BirtDataSetQuery class was only compatible with the former syntax, so it kept dropping off this critical section of the query during the report generation. This caused BIRT to essentially 'forget' the data type for each column, which means Integer, Date, and Boolean columns all became String columns.
Therefore, when performing Date operations on a String column (like the following):
DateTimeSpan.years(dataSetRow["Birthdate"],paramsReport[Date"|"End])>14
the BIRT report engine would complain
There exists an error in toDate method” Unparsable date: “2007-08-16”
The fix was to rewrite the query parsing utilities and make sure we maintain the extra data type column information.
During report generation, the module will write the new CSV dataset to the filesystem and then change the BIRT report design (XML) to references the new dataset. When overriding the flatfile dataset query to include the new filename, the module drops off an important part of the query which keeps track of the column data types.
The syntax for the flatfile dataset used to be a simple SQL-like query. The column data types must have been stored somewhere else in the report design.
SELECT columns FROM table
In some recent version of BIRT, the designer started tacking on the 'column_info' expression which includes the data type for every column.
SELECT columns FROM table : { column_info }
The BirtDataSetQuery class was only compatible with the former syntax, so it kept dropping off this critical section of the query during the report generation. This caused BIRT to essentially 'forget' the data type for each column, which means Integer, Date, and Boolean columns all became String columns.
Therefore, when performing Date operations on a String column (like the following):
DateTimeSpan.years(dataSetRow["Birthdate"],paramsReport[Date"|"End])>14
the BIRT report engine would complain
There exists an error in toDate method” Unparsable date: “2007-08-16”
The fix was to rewrite the query parsing utilities and make sure we maintain the extra data type column information.