Re: Error passing text parameter (CODE LIKE '1 %') to report

From: Anton Zimmermann <Anton.Zimmermann_at_bfi.admin.ch>
Date: 1997/11/10
Message-ID: <3466b335.0_at_fwsrva.bfi.admin.ch>


In article <640i66$eje14_at_lyra.hkstar.com>, laup_at_b1.hkstar.com says...
>
>...
>If I pass a text parameter(CODE LIKE '1 %') to a form using run_product, I
>got an error FRM-90928: Positional parameter after key on command line.
>...

Attached below an entry from Oracle's Problem Repository: 'REP-0152 CALLING REPORT FROM FORMS PASSING PARAMETER CONTAINING A SPACE'. You can try the solution 'USE TRANSLATE TO REPLACE SPACES'.

Hope this helps - Toni

---
Anton Zimmermann, Systemprogrammer
Swiss Federal Office of Information Technology and Systems

E-mail: anton.zimmermann_at_bfi.admin.ch
Voice : +41/31/325-9724; Fax:    +41/31/325-9767
Mail  : Monbijoustr. 74, CH-3003 Berne, Switzerland


====================== Start of attachment ===========================

                              Oracle Corporate Support
                                 Problem Repository

  1. Prob# 1015201.6 REP-0152 CALLING REPORT FROM FORMS PASSING PARAMETER CO
  2. Soln# 2063410.6 REPORTS BUG 313525/317488 - USE TRANSLATE TO REPLACE SP
  3. Prob# 1015201.6 REP-0152 CALLING REPORT FROM FORMS PASSING PARAMETER CO
Problem ID          : 1015201.6
Affected Platforms  : Generic: not platform specific
Affected Products   : Oracle Forms
                      Oracle Reports
Affected Components : SF40 V04.XX
                      SQLREP V02.XX

Affected Oracle Vsn : Generic

Summary:
REP-0152 CALLING REPORT FROM FORMS PASSING PARAMETER CONTAINING A SPACE +=+

Problem Description:


You are receiving the following error from Oracle Forms:

REP-0152 : Positional argument specified after keyword.

Problem Explanation:


This error occurs when passing a parameter with a space( blank ) in it to Oracle Reports. This error can occur from Forms when using the HOST or RUN_PRODUCT commands to call a report.

The Oracle Reports error documentation states:

REP-0152 Positional argument specified after keyword.

Cause:      On the command line, you entered an argument without its keyword
            after entering an argument with its keyword.  Once you have used
            a keyword on the command line, all subsequent arguments must use
            keywords as well.
Action:     Re-enter the command making sure that no positional arguments
            (arguments where the keyword is implicit) are specified after
            arguments with keywords.


+==+

Diagnostics and References:

  • {3318.6,Y,100} PASSES PARAMETER FROM FORMS TO REPORTS
  • {4835.6,Y,100} PASSING PARAMETERS WITH SPACES INSIDE
  • {8241.6,Y,100} REP-00152 2. Soln# 2063410.6 REPORTS BUG 313525/317488 - USE TRANSLATE TO REPLACE SP
Solution ID         : 2063410.6
For Problem         : 1015201.6
Affected Platforms  : Generic: not platform specific
Affected Products   : Oracle Forms
                      Oracle Reports
Affected Components : SF40 V04.XX
                      SQLREP V02.XX

Affected Oracle Vsn : Generic

Summary:
REPORTS BUG 313525/317488 - USE TRANSLATE TO REPLACE SPACES +=+

Solution Description:


This error is caused by Oracle Reports Bug 313525 and Oracle ToolKit Bug 317488.

Workaround for Bug 313525/317488:



Use the PL/SQL TRANSLATE() function to replace the space embedded in the parameter with another character. Then, translate the parameter value back in the Oracle Reports Before Form trigger.

For example:


  1. Translate the space to a tilde (~) in the Forms trigger or program unit that calls reports:

    param_value := TRANSLATE(:block.item,' ','~');

2. Send the parameter with the translated value to Oracle Reports

    as usual to reports using the RUN_PRODUCT or HOST built-ins.

3. Translate the parameter value back in the Oracle Reports Before Form

    trigger:

    :item_parm := TRANSLATE(:item_parm,'~',' ');

The tilde (~) character used in TRANSLATE was chosen because it is not commonly found in character strings.

Solution Explanation:


[Quoted] Oracle ToolKit bug 317488 has been fixed in Toolkit version 2.3.2. This Toolkit fix will be incorporated into Developer/2O00 Release 2.0 ( Oracle Reports version 3.0, Oracle Forms 5.0 ).

Additional Information:


Oracle Documentation:



[Quoted] PL/SQL User's Guide and Reference, Version 1.0 Appendix A, Functions
TRANSLATE Oracle Reports 2.5 Reference Manual,
Chapter 13, PL/SQL Interface
Report Triggers

Related Problem Repository Entries:



1008674.6
CANNOT PASS PARAMETERS CONTAINING SPACES FROM COMMAND LINE INTO REPORT Related Bugs:

313525
PARAMETER STRINGS CONTAINING SPACES NOT CORRECTLY PASS TO PARAMETER FORM 317488
CMD LINE PARSING INCORRECT WHEN DBL QUOTES AND SPACE ARE INVOLVED 313938
FORM PARAMETER CONTAINING MORE THAN ONE WORD DISPLAYS INCORRECTLY 305513
COMMAND-LINE DOESN'T PARSE FILENAMES WITH SPACES CORRECTLY; WIN95 AND NT +==+

References:

 ref: {6458.6}     BUG-313525
 ref: {6459.6}     BUG-317488
 ref: {6460.6}     BUG-313938
 ref: {6461.6}     BUG-305513
 ref: {6462.6}     PRE-1008674.6

====================== End of attachment ===============================
Received on Mon Nov 10 1997 - 00:00:00 CET

Original text of this message