SQL*ReportWriter Error? Help!

From: <laportes_at_wl.aecl.ca>
Date: Sat, 29 Feb 1992 01:09:21 GMT
Message-ID: <1992Feb29.010921.11720_at_cu23.crl.aecl.ca>


Hi, I seem to be having trouble with SQL*ReportWriter.

I am using the same two reports, which when run interactively with manual insertion of the parameters they work just fine. However, when I try to pass the parameters via the RUNREP command either via a SQL*Forms trigger or by a DCL command file, one of the paramters allways seems to ge missing. Unfortunately, it is not the SAME parameter in either example.

Our installation is currently using the following versions within a VAX environment:         

	RDBMS			6.0.30.3.0
	SQL*ReportWriter	1.1.10.5
	SQL*Plus		3.0.6.4.1
	SQL*Forms		6.0.16.4
	SQL*Menu		5.00.11.03.00
	PL/SQL			1.00.32.03.00

The SQL*Forms trigger I am encountering problems with is as follows:


	DECLARE
		rline  CHAR(120);
  		refno  CHAR(18);
	BEGIN
	
	/*store quotation reference number*/
		refno := :GEN_INFO.QUOTE_NO

	/*save any changes*/
 		COMMIT_FORM;

	/*print cover and sign off page*/
		rline:='RUNREP REPORT=COISDR:[EXE.REPORTS]BIG_QUOTE USERID=/ '
			 ||'DESNAME='||refno||'.PS1 QUOTENO='||refno;
		HOST(rline);

	/*print quotation details page(s)*/
		rline:='RUNREP REPORT=COISDR:[EXE.REPORTS]Q_BODY USERID=/ '||
        		  'DESNAME='||refno||'.PS2 QUOTENO='||refno;
 		HOST(rline);

		/*print out the newly created output/files*/
		rline:='PRINT/QUE=W_PS_CO '||refno||'.PS1, '||refno||'.PS2';
	 	HOST(rline);

END;



I seem to be encountering a strange occurence when the form I am currently designing attempts to excute this trigger.

The first connection to SQL*ReportWriter does not seem to recognize the QUOTENO parameter. The RUNREP Parameter Screen displayes the following:

		File Name:   	000100100.PS1
		Quote No.:	

The second connection to SQL*ReportWriter does recognize the QUOTENO parameter. The RUNREP Parameter Screen displayes the following:

		File Name:   	000100100.PS2
		Quote No.:	000100100

I am very confused. How can the same PL/SQL variable, REFNO which is defined, and properly referenced seem to disappear?

Upon discovering this error, I then decided just pass the REFNO variable to a DCL command file and produce the two reports that way. The command file I designed to run two SQL*ReportWriter reports, is a follows:


$!This command file produces the Cover/Sign Off Page
$!and the quotation details reports.
$!It requires that the parameter P1 represent the
$!the quote number that someone wants to print.
$!These two reports are produced by SQL*ReportWriter
$!and can be found in the Post Script files
$!'P1'.PS1 and 'P1'.PS2, these files are sent
$!directly to the Commercial Operations printer queue W_PS_CO
$!-----------------------------------------------------------
$!
$!create output file names, such as 000100100.PS1 and 000100100.PS2
$!

	$FNAME1 = P1+".PS1"
	$FNAME2 = P1+".PS2"

$!
$!display processing message to the user
$!
$WRITE SYS$OUTPUT "Producing Cover/Sign Off Page of Quote..."
$!
$!Allow for user input from the keyboard
$!SQL*ReportWriter will create the Post Script files FASTER
$!if the parameter screen is displayed
$!
$ASSIGN/USER sys$command sys$input
$!
$!Run the Cover/Sign Off Page of a quotation
$!
$RUNREP DESNAME='FNAME1' QUOTENO='P1' - REPORT=COISDR:[EXE.REPORTS]BIG_QUOTE - USERID=COIS/COISWC5
$!
$!display second processing message to the user
$!
$WRITE SYS$OUTPUT "Producing Estimate Breakdown Page(s) of Quote..."
$!
$!Allow user input via the keyboard again
$!
$ASSIGN/USER sys$command sys$input
$!
$!Run the Details/Breakdown Pages(s) of the quotation
$RUNREP DESNAME='FNAME2' QUOTENO='P1' - REPORT=COISDR:[EXE.REPORTS]Q_BODY - USERID=COIS/COISWC5
$!
$!Send previously produced post script files to the print queue
$!
$PRINT/QUE=W_PS_AS 'FNAME1','FNAME2' $EXIT =============================================================================== This time both of the parameters (DESNAME and QUOTENO) are passed and displayed
correctly with the Parameter Screen both the first and second time RUNREP is called.

The new problem is that using this method, RUNREP does not seem to recognize the second USERID parameter and displayes the 'security screen', please enter username and password.

What could be causing this problem? Both of my strange occurrences seem to be attributed to using RUNREP, can anyone suggest a solution? Has anybody else encountered similiar problems?

Please respond with any suggestions, observations or solutions.


Shelley La Porte			AECL net: WL::LAPORTES
AECL - Research				Phone   : (204) 753-2311 Ext 2522
Whiteshell Laboratories			Fax     : (204) 753-2455
Pinawa, Manitoba R0E 1L0		Internet: laportes_at_wl.aecl.ca
__________________________________________________________________________
Received on Sat Feb 29 1992 - 02:09:21 CET

Original text of this message