[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: Multiple Headings



Hope this little program helps.
******************************
BEGIN-SETUP
DECLARE-LAYOUT STANDARD
     Stuff....
END-DECLARE

DECLARE-REPORT  RPT1
    LAYOUT=STANDARD
END-DECLARE

DECLARE-REPORT  RPT2
   LAYOUT=STANDARD
END-DECLARE

END-SETUP

BEGIN-REPORT
 DO MAIN
END-REPORT

BEGIN-HEADING 1 FOR-REPORTS=(RPT1)
   PRINT '-----1ST RPT HEADER--1ST RPT HEADER--' (1) CENTER
END-HEADING

BEGIN-HEADING 1 FOR-REPORTS=(RPT2)
   PRINT '-----2ND RPT HEADER--2ND RPT HEADER--' (1) CENTER
END-HEADING

BEGIN-PROCEDURE MAIN
  USE-REPORT RPT1
  PRINT 'HELLO WORLD!!'    (+2)
  USE-REPORT RPT2
  PRINT 'PRINT RPT2!!'     (+2)
END-PROCEDURE   ! MAIN
******************************

Cindy
At 05:20 PM 8/25/98 EDT, Holly Reid wrote:
>I have tried both methods and I still cannot get the correct header
>information to go on the correct report.
>
>I have one print statement in my report immediately following a read
statement
>to list the data read.  The other print statement is found lower in the SQR;
>it prints out any errors found after checking the data.
>
>Currently, no matter which method I try.  Both reports have the error report
>heading.  Any help would be appreciated,  let me know if you need more
detail.
>
>
>Holly Reid
>Elleon Dier, Inc.
>
>In a message dated 8/25/98 5:16:05 PM Eastern Daylight Time,
juan@GYSSA.COM.GT
>writes:
>
><< I think that is best if you use the parameter FOR-REPORT in the Heading
> section.
>
> For Example:
> begin-heading for-report=(report0)
> STUFF
> end-heading
>
> begin-heading for-report=(report9)
> STUFF
> end-heading
>
> begin-heading for-report=(report1)
> STUFF
> end-heading
>
>
> I hope this help you
> Juan Manuel Alvarado
> CPS-DBA Sybase XI
> Gerencia & Sistemas Guatemala
> www.gyssa.com.gt
>
> > -----Original Message-----
> > From: David Anderson [SMTP:DANDERS1@SMTPGW.IS.HFH.EDU]
> > Sent: Tuesday, August 25, 1998 2:05 PM
> > To:   Multiple recipients of list SQR-USERS
> > Subject:      Multiple Headings
> >
> > I have a program that produces two reports requiring different
> > headings.
> > I have setup two kinds of reports:
> > declare-layout Default
> >         paper-size      =       (11, 8.5)
> >         orientation     =       LANDSCAPE
> >         top-margin      =       0.5
> >         left-margin     =       0.05
> >         max-columns     =       177
> >         max-lines       =       58
> >         char-width      =       4.32
> >         line-height     =       9
> > end-declare
> >
> > declare-printer HPLaserJet
> >         type            =       HPLASERJET
> >         font            =       0
> >         point-size      =       6
> >         pitch           =       17
> > end-declare
> >
> > declare-report Report9          !Debug Report
> >         layout          =       Default
> >         printer-type=   HPLaserJet
> > end-declare
> >
> > declare-report Report0          !Dollars Report - Current Activity
> >         layout          =       Default
> >         printer-type=   HPLaserJet
> > end-declare
> >
> > declare-report Report1          !Hours Report - Current Activity
> >         layout          =       Default
> >         printer-type=   HPLaserJet
> > end-declare
> >
> > I then installed an evaluation statement in the HEADING section:
> >         evaluate #ReportNumber
> >                 when = 9        !Debug Report
> >                                 stuff
> >                 when = 0        !Activity Report - Dollars
> >                                 stuff
> >                 when = 1        !Activity Report - Hours
> >                                   stuff
> >         end-evaluate
> >
> > Finally, throughout the program I use use-report Reportx to write to
> > the
> > correct report.  However, if the report is only a page long the report
> > uses
> > the last #ReportNumber.  What should I be doing?????????????
>
>  >>
>
>