Reports - Page numbering, Table of Contents 
Author Message
 Reports - Page numbering, Table of Contents


                       - - - - - - - - - -            
Hi all

Thanks to all that tried to help with my problem of the table of contents
and capturing the current page number of a report as it is being generated.

It seems that that there is no way of accurately capturing the current page
number of a report, save this to a file and later print a table of contents
from this new file.

I find it hard to believe that Topspeed has not run into this problem
before, surely there must be a way of querying for the current page number
of a report.

If anybody has some further thoughts or ideas, I would be very thankful for
any thoughts.

Thanks again

JCF
-------------------------------------------------------------------------
        Jon Fletcher        Phone:        (250) 579-5522
        New-Tech Systems    FAX:          (250) 579-5818
        2955 Westsyde Road  Compuserve:   71413,3062    

        V2B 7E7             Web Page:     http://www.*-*-*.com/ ~newtech
-------------------------------------------------------------------------



Fri, 24 Dec 1999 03:00:00 GMT  
 Reports - Page numbering, Table of Contents


                       - - - - - - - - - -            
Hi Jon,

Quote:
> Thanks to all that tried to help with my problem of the table of contents
> and capturing the current page number of a report as it is being generated.
> It seems that that there is no way of accurately capturing the current page
> number of a report, save this to a file and later print a table of contents
> from this new file.

I didn't see your original post or the answers but I would have
thought that one of two things would work:- 1) querying the use
variable of the PAGENO field for a prop: of some sort _after_ the
detail line is printed; on second thoughts, I guess this is where
your attempts have been and it doesn't work, however you could try,
2) turn on the print preview option and then check
RECORDS(PrintPreviewQueue) _after_ you print the line - I reckon this
would definitely give it to you.

Quote:
> I find it hard to believe that Topspeed has not run into this problem
> before, surely there must be a way of querying for the current page number
> of a report.

I have seen a lot of talk about it on Compuserve but I believe there
are a number of technical issues which make it damn near impossible
(it's to do with Windows/API's etc., not Clarion).

HTH,

Simon Brewer, Email Limited (Australia)



Fri, 24 Dec 1999 03:00:00 GMT  
 Reports - Page numbering, Table of Contents


                       - - - - - - - - - -            

Quote:

> If anybody has some further thoughts or ideas, I would be very thankful for
> any thoughts.

> Thanks again

> JCF

There is a procedure which I used to use in CPD2.1 which involved first
printing the file to disk, then looking for the pagebreak, and
extracting the page-number. It was used to allow a user to start
printing from any given page. It's fully explained in that excellent
book 'Tips, Tricks & Techniques for CPD'. I don't know if it's adaptable
to your problem; if you don't have access to the book, I could snip the
code example (if there is one), or fax the chapter?

Regards,
Peter Corrigan



Fri, 24 Dec 1999 03:00:00 GMT  
 Reports - Page numbering, Table of Contents

<<There is a procedure which I used to use in CPD2.1 which involved first
printing the file to disk, then looking for the pagebreak, and
extracting the page-number. It was used to allow a user to start
printing from any given page. It's fully explained in that excellent
book 'Tips, Tricks & Techniques for CPD'. I don't know if it's adaptable
to your problem; if you don't have access to the book, I could snip the
code example (if there is one), or fax the chapter?>>

The way to do this is create a variable (page_number) and place this on
your report header.  Make sure your page size is the same size as the
paper you are printing to (exactly the same size) 8.5 x 11. (8500x11000)..
Then before your are printing your detail bands call the routine listed
below.  Prior to calling set PAGE_POSITION=185 (size of detail band you
are printing)

CHECK_PAGE ROUTINE
  ADD_PAGE+=PAGE_POSITION
  IF ADD_PAGE>=10500 (10.5 PAGE SIZE)
      ENDPAGE(REPORT)
      PAGE_NUMBER+=1 (or whatever is needed or passed)
      ADD_PAGE=PAGE_POSITION
  .

That routine will force page breaks at 10.5" down the page - this
procedure works fanatastic and eliminates the forcing of the page break
and I even use it to allow for a sized break - meaning if my detail for
that subject  doesn't fit on this page I break.  By increasing the
PAGE_POSITION variable to include detail, sub-detail, totals, grand-totals
the report will only print that detail on the current page if everything
fits.

Hope that helps!
David



Fri, 24 Dec 1999 03:00:00 GMT  
 Reports - Page numbering, Table of Contents


Quote:

>                       - - - - - - - - - -            
>Hi Jon,
>> Thanks to all that tried to help with my problem of the table of contents
>> and capturing the current page number of a report as it is being generated.
>> It seems that that there is no way of accurately capturing the current page
>> number of a report, save this to a file and later print a table of contents
>> from this new file.

>2) turn on the print preview option and then check
>RECORDS(PrintPreviewQueue) _after_ you print the line - I reckon this
>would definitely give it to you.

This was an appealing proposition Simon, did you ever get it to work?

I tried but it seems that the metafiles are only created ...

1. when a specific ENDPAGE is called, such as on a new page for a group break, or
2. when Clarion feels like it!

It appears that a report is held in memory, without page numbers until it is ready to
print, at which time the metafiles are created, and the page numbering sequence is
initiated.  This would explain why the page number variable is not accessible at the time
the Detail is printed - it doesn't exist at that time!

Unfortunately CW doesn't appear to know the vertical position of the next section to be
printed either,  as Access for example seems to always know, so it looks as if counting
Detail prints is the only way to do it - arrrrghhhhh!

Geoff Bomford
ComForMark
Computer services For Marketing
Sydney,  Australia



Thu, 06 Jan 2000 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Printing Page Number in table of contents

2. Reports: Table of Contents

3. Reports: Table of Contents

4. Initializing page number in report

5. Report Page Number

6. Report Page Number

7. Page numbering in reports

8. Page number in report

9. CW4 Report Page Numbers

10. Change report page number

11. Problem setting page number in reports

12. How to check the page number on a report

 

 
Powered by phpBB® Forum Software