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

Re: Multiple reports



you do not need to use new-report when using use-report.

"Thomas, Lyla" wrote:

> Hello all,
>    I am still having a few more problem with this. If any one can help me I
> will appreciate it very much. I do not know what I am doing wrong here and I
> searched in the web sites and all of them were doing same as this also. My
> program is doing the following: It is writing the first report in the
> specified path in $REF_Path_one. But it never writes the second report at
> all. This is what I have:
> begin-setup
>  #Include 'setup02b.sqc'
> declare-report one
>    layout=PTPSL215
>    printer-type={PRINTER_TYPE}
> end-declare
>
> declare-report Two
>     layout=PTPSL215
>     printer-type={PRINTER_TYPE}
> end-declare
>
> end-setup
> -------------------------------------
> Begin-heading 8 For-Reports=(One)
>
> #Include 'stdhdg01.sqc'
>   print 'ActDate'            (+1,1)
>   ........
> end-heading
>
> Begin-heading 8 For-Reports=(Two)
>
> #Include 'stdhdg01.sqc'
>   print 'emplid'            (+1,1)
>   ............
> end-heading
>
> begin-procedure Get_Main_info
>  Use-Report One
>  New-report $REF_Path_one
>  Use-Report Two
>  New-report $REF_Path_two
>
> BEGIN-SELECT
> A.effdt
> A.emplid
> A.Action
>
>     If &A.Action = 'M'
>          Use-Report One
>          Do Write_One_info
>     end-if
>     If &A.Action = 'P'
>          next-listing
>          Use-Report Two
>          Do Write_Two_Info
>          next-listing
>     end-if
>
> FROM Table  A
> END-SELECT
> end-procedure !Get_Main_info
>
> Begin-Procedure Write_One_Info
>
>        print $A.effdt              (+1,1)
> end-procedure
> Begin-Procedure Write_Two_Info
>
>        print $A.emplid              (+1,1)
> end-procedure
>
> -----Original Message-----
> From: Greg Gargett [mailto:ggargett@SEANET.COM]
> Sent: Thursday, October 26, 2000 3:28 PM
> To: SQR-USERS@list.iex.net
> Subject: Re: Multiple reports
>
> in your declare-report sections you need to include the layout you want to
> use
> for the report.  the layout defined in setup02b.sqc (or ptpsl215.sqc,
> ultimately) is called PTPSL215.  so, your declare-reports would look
> something
> like...
>
> declare-report One
>   layout=PTPSL215
>   printer-type={PRINTER_TYPE}
> end-declare
>
> declare-report Two
>   layout=PTPSL215
>   printer-type={PRINTER_TYPE}
> end-declare
>
> "Thomas, Lyla" wrote:
>
> > Hello,
> >    I am trying to write multiple reports from my SQR and I am having few
> > problems using #Include 'setup02b.sqc' with this sqr. How can I use this
> sqc
> > with multiple reports to change the page setup? Both of these reports will
> > be using setup02b.sqc. eventhough I have that Sqc is included, declare
> > report is changing to regular print setup. How can I use this sqc in my
> > program instead of specifically setting up margins,printer type ...etc in
> > the program?
> > Any help is greatly appreciated.
> > Thanks in advance.
> > Lyla
> > This is what I have.
> > ____________________
> >
> > begin-setup
> > #Include 'setup02b.sqc'
> > declare-report One
> >
> >  ??? how to include specific sqc
> > end-declare
> >
> > declare-report Two
> > end-declare
> > end-setup
> > -------------------------
> > begin-procedure Init-Report
> >   let $Path = '\\fileserv\\.....'
> > end-procedure
> > ---------------------------------
> > begin-heading 8 For-Reports=(One)
> >   new-report $Path
> >      print 'ActDate'            (+1,1)
> >      print 'effdt'
> >      .....
> > end-heading
> > begin-heading 8 For-Reports=(Two)
> >   new-report $Path || newreport name
> >      print 'Emplid'            (+1,1)
> >      print 'effdt'
> >      .....
> > end-heading
> > ------------------------------
> > procedure write_report
> >  Use-report One
> >   print $ActDate (+1,1)
> > .......
> > end-procedure
>
> --
> Greg
>
> "I never have more than one drink before dinner.
> But I do like that one to be large and very strong
> and very cold and very well-made." - Ian Fleming




--
Greg

"I never have more than one drink before dinner.
But I do like that one to be large and very strong
and very cold and very well-made." - Ian Fleming