Kbase P108599: Report Builder: Runtime Engine fails to print when parameter value in RB-OTHER-PARAMETERS contains C
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  08/09/2005 |
|
Status: Unverified
SYMPTOM(s):
Report Builder
Sending User-defined Parameter via RB-OTHER-PARAMETERS
Value of User-defined Parameter contains CHR(10) to create a line-break
Report is not displayed or printed
Runtime Engine Status file contains the following error:
[]
RO-ERROR-CODE=J
RO-ERROR-MESSAGE=No library specified
RO-PAGES=0
Using ~n in place of CHR(10) has no effect
Report is displayed/printed once CHR(10) is removed from the parameter value
CAUSE:
CHR(10) is intended to be used to delineate between different User-defined Parameters contained within the RB-OTHER-PARAMETERS setting. Together with ~n, CHR(10) allows users to send multiple User-defined Parameters to a report.
Placing CHR(10) within the value itself causes it to be interpreted as text so it is just displayed within the report. For example:
"RuntimeA = test1 CHR(10) test 2"
This would displayed literally in the report:
test1 CHR(10) test 2
If CHR(10) is placed where it can be interpreted then the Runtime Engine will expect a new parameter. For example:
"RuntimeA = test1" + CHR(10) + "test 2"
The Runtime Engine will fail when it does not find a new parameter in the correct format.
FIX:
Do not use CHR(10) in a User-defined Parameter passed to Report Builder via RB-OTHER-PARAMETERS. Instead, use a dummy character than can be replaced by CHR(10) within the report itself.
For example, pass the following as RB-OTHER-PARAMETERS:
"RuntimeA = test1|test2" /* RB-OTHER-PARAMETERS */
In Report Builder, create a Calculated Field called RTA with the following formula:
REPLACE(RUNTIME-PARAMETER("RunTimeA"), "|", CHR(10))
Add the RTA field to the report, right-click on it, select Alignment and select Word Wrap to ensure that the line-break is handled correctly.
Run the report and the following result should be seen:
test1
test2