Kbase 15825: Report Builder override filter with date field
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  10/15/2008 |
|
Status: Verified
FACT(s) (Environment):
Report Builder
SYMPTOM(s):
Problem overriding RB-FILTER.
** RB-FILTER contains an error at offset xx: Syntax error
CAUSE:
Date variables should be passed to Report Engine in the American format (mdy).
FIX:
Suppose the session you run Report Engine from is started with another format than "mdy". If you override the RB-FILTER like this:
RB-FILTER = "db_date_field <= ":U STRING(date_var), the Report Engine
fail with the following message:
** RB-FILTER contains an error at offset xx: Syntax error.
The variable date_var should be converted into a mdy format as shown below:
DEFINE VARIABLE mdy_date AS CHARACTER NO-UNDO.
DEFINE VARIABLE date_var AS DATE NO-UNDO.
UPDATE date_var.
ASSIGN mdy_date = STRING(MONTH(date_var)) + "/":U +
STRING(DAY(date_var)) + "/":U +
STRING(YEAR(date_var)).
ASSIGN RB-FILTER = "db_date_field <= ":U + mdy_date.
As the user does not know in advance which date format will be used, it is appropriate to use the conversion above.