[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: On-break behavior
- Subject: Re: On-break behavior
- From: Manoj Gurjar <mgurjar@HOTMAIL.COM>
- Date: Tue, 9 Nov 1999 14:43:18 EST
I think we require to give print position with On-Break and
if you don't want anything to print use Print=never.
>From: John Milardovic <milardj@SX.COM>
>Reply-To: SQR-USERS@list.iex.net
>To: Multiple recipients of list SQR-USERS <SQR-USERS@list.iex.net>
>Subject: Re: On-break behavior
>Date: Tue, 9 Nov 1999 10:39:15 -0500
>
>I think I figured it out - if you specify a print position in the on-break
>line it writes to the buffer even if nothing is printed.
>
>EX.
>
>This produces a 'tmp' file :
>begin-program
>begin-select
>invoice_no (,1) on-break print=never before=proc
>from
>invoice_header
>order by invoice_no
>end-select
>end-program
>
>begin-procedure proc
> move &invoice_no to $invoice_no
> new-report $invoice_no
> print 'Test' (+1,1)
> new-report 'tmp'
>end-procedure
>
>And this does not :
>
>begin-program
>begin-select
>invoice_no () on-break print=never before=proc
>from
>invoice_header
>order by invoice_no
>end-select
>end-program
>
>begin-procedure proc
> move &invoice_no to $invoice_no
> new-report $invoice_no
> print 'Test' (+1,1)
> new-report 'tmp'
>end-procedure
>
>John Milardovic
>
>
> > -----Original Message-----
> > From: John Milardovic
> > Sent: Tuesday, November 09, 1999 10:26 AM
> > To: 'SQRUG'
> > Subject: On-break behavior
> >
> > Oracle 8
> > SQR4.0.2
> > AIX and NT
> >
> > I have a bunch of SQR reports that access a common procedure which
> > determines how many instances of the report to produce and what format
>and
> > sort options to use for each instance. The common procedure creates a
> > series of header files then returns control back to the calling program
> > which produces the body (report output) files. The common procedure is
> > then called to concatenate the body and header files.
> >
> > The problem that I have is that in two places I use the command
>new-report
> > 'tmp' to force SQR to flush the buffer and write the contents to a file
> > this works great for most of my reports, but two of them (which use the
> > same internal logic) create the expected files but also create a 'tmp'
> > file which contains only a form-feed (\f) character. At no time am I
> > printing anything, or calling new-page, while the new-report 'tmp'
>command
> > holds sway except for a col1 (,1) on-break print=never line. This line
> > seems to be the only difference between the reports which behave
>correctly
> > and the two that do not.
> >
> > To make a long story as short as possible I was wondering whether the
> > print=never works as I think or whether it might be printing a null or
> > space or something to the buffer which would create the 'tmp' file.
> >
> > Program logic
> > 1. Select rows - order by check no
> > 2. Before break of 1 do driving routine
> > 3. Driving routine calls common procedure to determine number of
> > instances
> > 4. Output file is now *.head - create header files
> > 5. Output file is now 'tmp' - flush buffer
> > 6. Set up loop for desired number of instances
> > 7. Within loop create report (output file is now *.body)
> > 8. Output file is now 'tmp' - flush buffer
> > 9. Concatenate report with header file
> > 10. Go to 7 if another instance to create else goto 1
> >
> > Thanks in advance.
> > John Milardovic
>
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com