Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Starting page in Print

Status
Not open for further replies.

PankX

Programmer
May 10, 2002
29
0
0
ID
Hi, anybody knows how to print using starting page in fpd 2.6 report form ?

For example, i want to print starting from page 5.

Thank's
Pram
pram@sby.centrin.net.id
 
Pram,
This is tricky, sometimes. If your print record set is based on a single table (or single driving table), you can control the print start point easily. Create a screen that allows you to "Specifiy" the starting point for printing. I actually created a facility that no matter what gets printed, I print it though here. This way, if a print "Fails", I can restart it at any time from the last page. (I have had many similar problems). The key ideas are this:

Create a "Control" list (at the very least) for your print run. What this is, is a database that has all the elements you are wanting to print. Then, the page number is the same as the last record printed, on your screen where you have created a variable to hold the "Starting Page" value, simply put in the number of the "Page" you want. What that corresponds to is the record number in your "Control" set. Then before you issue your "REPORT FORM" command, just do this:

SELECT <controltable>
GO M.STARTPAGE
REPORT FORM.... TO PRINTER (or whatever you have there in your line).

This assumes that what you are printing can be put into a single &quot;Result&quot; Table. Again, another good thing about this, especially if you have large print batches (like 1000's of pages), and it's all single page, it works great.

If you have a multi page report, you can use a similar philosophy, you just need to use a &quot;Record Value&quot; to print from. If there is no order, you can pass in a field name (or name), and the value to find, for example, in your screen here, you would pass say, last name and the name to the process. So your screen would capture 2 items, name if field, and value of field. (And maybe table name).

Then:

SELECT (TABLENAME)
LOCATE FOR &FINDFIELD = M.FINDVALUE

If you have an index set on, and a specific order, and you know the last item printed, then you can use:

SELECT (TableName)
SEEK M.FINDVALUE

This is much faster, but requires an index, and that the index tag is set properly.

Then, issue:

REPORT FORM.... (whatever values you have).

Hope this is of some help to you.


Best Regards,
Scott

Please let me know if this has helped [hammer]
 
_pbpage=5
_pepage=1000
m.begin=_pbpage
m.end=_pepage
SELECT &table

PRINTJOB
repo form &report TO PRINT
ENDPRINTJOB

Ety1910
Romania
 
Thank you all !

I decide to use

set cons off
printjob
_pbpage=5
repo form .. to printer
endprintjob
set cons on

once again, thank's for your responses !

Pram
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top