[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: [sqr-users] URGENT!!!!!!!!
OK, just off the top of my head.....
Since these outputs seem closely related, why have separate SQRs for them?
Can it be done through a single SQR?
If for some reason that's not possible, then the only thing I can think of
off-hand would be to write an include file with 2 procedures. Something
like...
Get_Master_Page_Num
Set_Master_Page_Num
Get_Master_Page_Num would look for a file with a specific name (whatever you
decide it should be, "My_master_page_no.txt" for this example ) and read the
master page num from it and store that + 1 in a variable. If it can't find
the file, it stores 1 into that variable
Set_Master_Page_Num would write the current master page number to the same
named file (overwriting it)
Your programs should include this file, call Get_Master_Page_Num first, use
this variable for the running count (updating it appropriately) and when
done, call Set_Master_Page_Num (assuming something was printed). This will
be keep your running count correct. Wherever you want the total, you'll
need to print a distinct string that will never appear in the letters
themselves or as part of the .spf file
You don't say what kind of output your using, but the batch program should
start by deleting My_master_page_no.txt, call the programs with the "-keep"
flag and no "-printer" flag. This will produce .spf files. Then call
either a new SQR that replaces your special string in the files with the
value in My_master_page_no.txt, or use whatever OS specific tool you feel
comfortable doing this with.
The end of your batch file would be calling sqrp on each of the spf files
with the appropriate printer flag for the output type you want (or your sqr
programs could append a line onto a new batch file that will get called from
the first one to do this, in case the sqr files don't always produce a
letter).
In summary:
Try to do it in 1 SQR program.
HTH,
Don
On 9/16/07, ..... ..... <srujan33@gmail.com> wrote:
>
> hi shashidhar,
> Thank you for quick response, your answer works for a report printed
> by single SQR, but i have multiple SQR's ..let us say like I have 3
> SQR's first SQR prints 5 pages, second SQR prints 4 pages and third
> SQR prints 1 page that is total of 10 pages (5+4+1=10) I have to get
> page numbers printed starting from first page of first SQR to last
> page of Last SQR ("page 1 of 10, page 2 of 10,.......page 10 of 10").
> These SQR's are called by a single shell script.
> Thanks,
> srujan
>
> On 9/16/07, Shashidhar Rao A <shdhra@yahoo.com> wrote:
> > hi Srujan'
> > u can use page-number variable to print the page number.
> >
> > begin-footing 1
> > page-number (1,37) 'Page '
> > last-page () ' of ' '.'
> > end-footing
> >
> > If you have 50 pages and you are on 10th page, it will appear as "Page
> 10 of 50" at the footer of the report.
> >
> > Regards
> > shdhra
> >
> > "..... ....." <srujan33@gmail.com> wrote: Hi All,
> > Iam new to SQR, Iam working on a task which iam unable to do please
> > some one help me in this regard..
> > I have a shell script which calls some SQR's each sqr prints some
> > letters now my task is to print the page numbers on each letter
> > starting from first letter of first SQR to the last letter of last SQR
> > in the format "page 1 of n,page 2 of n,........page n of n" where 'n'
> > is the total number of letters printed by all SQR's. Thanks in
> > advance.
> >
> > Thanks,
> > srujan
> >
> > _______________________________________________
> > sqr-users mailing list
> > sqr-users@sqrug.org
> > http://www.sqrug.org/mailman/listinfo/sqr-users
> >
> >
> >
> > ---------------------------------
> > Luggage? GPS? Comic books?
> > Check out fitting gifts for grads at Yahoo! Search.
> >
> > _______________________________________________
> > sqr-users mailing list
> > sqr-users@sqrug.org
> > http://www.sqrug.org/mailman/listinfo/sqr-users
> >
>
> _______________________________________________
> sqr-users mailing list
> sqr-users@sqrug.org
> http://www.sqrug.org/mailman/listinfo/sqr-users
>
--
-----------------------------------------------------------------------
Donald Mellen | Ray Ontko & Co. - Richmond, IN - http://www.ontko.com/
donm@ontko.com | "In the beginning, there was nothing, which exploded"
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users