Forms v3 => Reportwriter v6 Interface Problems

From: Jeff Hansen <jhanse1_at_abacus>
Date: 18 Jul 1994 22:27:50 GMT
Message-ID: <30evl6$a6p_at_abacus.tis.tandy.com>


I am attempting to generate a Form v.3 that manipulates a table then allows the user to query the table. I would like to be able to call ReportWriter v.6 with the user's query and print the results.

I have been able to find references in the Forms manuals that tell the forms side of the story as well as the references in the ReportWriter manuals that tell the ReportWriter side of the story. I am unable to get them to work together.

I would like to run the ReportWriter in batch mode from a Forms Trigger so that the user is unaware of the two different tools being used.

I have three issues:   

  1. The command that is being placed in the HOST function from forms works perfectly if it is typed directly on the command line with the exception of inserting quote marks around the <parm> variable sent to ReportWriter. When using the HOST function, ReportWriter responds with an error ORA-00920. I need a way to determine where this error is occuring, because it does not occur if it executed directly from the command line.
  2. The quotes on the varibles are being parsed out between Forms and the Ultrix command line as illustrated procedure include below.
  3. When the error occurs the terminal is off base and the session has to be closed to reset the terminal. How can this terminal connection problem be resolved?

If anyone has any ideas, please respond through this format or email to  jhanse1.mhs_at_mhsgate.tandy.com.

Thanks,

Jeff
(817) 878-0339

The actual Procedure that calls the HOST function follows:

PROCEDURE P_call_report IS

   last_query CHAR(240);
   quoted_query CHAR(240);
   quotes CHAR(8) := '''''';
BEGIN
   last_query := SUBSTR(:SYSTEM.LAST_QUERY,

                      (INSTR(:SYSTEM.LAST_QUERY,
                             ' WHERE ')+7));
   message(last_query);
   break;
   quoted_query := replace(last_query,'''',quotes);    message(quoted_query);
   break;
   HOST( 'echo tvsrunrep
           report=popvndrep
           userid=(omitted)    
           paramform=yes
           destype=file
           desname=popvndrep
           desformat=wide
           batch=no
           lastquery=' || '''"' || quoted_query || '"'' > jlh');
END;
/*

   the echo above is only used to trap the runrep command    into a file "jlh"
*/

Following is the result of the HOST from forms v3:
(Note1: the missing quote marks around the variables)
(Note2: newlines added for visibility)

tvsrunrep report=popvndrep userid=(omitted) paramform=yes destype=file desname=popvndrep desformat=wide batch=no lastquery="(VENDOR LIKE %) and (PART = 1027)

            order by popvnd.vendor, popvnd.part"

How can I prevent the quotes around the variables from being stripped off???

Jeff Received on Tue Jul 19 1994 - 00:27:50 CEST

Original text of this message