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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

fpw2.5: udf in repo form to create a table of contents 1

Status
Not open for further replies.

MJJ

Programmer
Jul 27, 2000
13
BH
Help! I'm using fpw2.5 (out of my control to upgrade) to create a report. This report is from 2 related tables & is sorted by a &quot;title&quot;. Each different &quot;title&quot; is started on a new page. I need to make a table of contents with the titles & their beginning page numbers. (Title &quot;A&quot; starts on page 1 & ends on page 3, Title &quot;B&quot; starts on page 4 & ends on page 8, etc...) so the TOC would need to be like:<br>A.................................1<br>B.................................4<br>I realize I probably have to use a user defined function to save each new title & its page number, but I have no earthy idea how to accomplish this! I've tried (very poorly) to save it to an array, but I suppose I just don't know what the heck I'm doing, because I can't seem to get it right. I'll get all combinations of wrong info - i.e. correct titles, wrong page numbers...correct titles, no page numbers...no titles, good page numbers. <br>Please help - thank you for any response!
 
Make sure your report form has some special letters not used any where else in the report like &quot;GROUP TITLE&quot; and &quot;PAGE NUMBER&quot; that identifies the titles and page numbers. <br>Write the report to a text file.<br>open a new text file with fopen() <br>Open the report text file with fopen()<br>in a do while !feof()<br>Look for the special letters for the title and page numbers and build yourself the Table of Contents <br>Print the toc page text file<br>then print the report text file or rerun the report.<br> <p>David W. Grewe<br><a href=mailto:Dave@internationalbid.net>Dave@internationalbid.net</a><br><a href= > </a><br>
 
DGREWE - I know it's been like 4 1/2 months, but I got stopped doing enhances to the fpw2.5 system and had to redo everything in vfp6. I'm still in the process, but I finally had a chance to implement your suggestion - and wanted to say thank you; it worked great!
~Marla
 
Thanks for the feed back, Glad it worked for you David W. Grewe
Dave@internationalbid.com
ICQ VFP ActiveList #46145644
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top