If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Saving page number from report
Hi,
I have about a 200 page report that gets its data using every record in a table. I would like to have a field in each record for a page number and have the field filled as the report prints. I can then use that information to print various indexes and table of contents. Is there a way to assign the page number to each record as the report pirnts? If no is there a better way? Thanks, |
#2
|
|||
|
|||
Saving page number from report
You can create a table for holding the page numbers. Then put code in the
report's sections to write the values you need to that table. In the Report's Open event procedure, delete any existing entries in the table (from last time the report was run.), and OpenRecordset to append the values. In the Print event of the Detail section, AddNew to the recordset, to record the primary key value and page number or whatever you need. In the report's Close event, close your recordset. -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Phillip" wrote in message ... Hi, I have about a 200 page report that gets its data using every record in a table. I would like to have a field in each record for a page number and have the field filled as the report prints. I can then use that information to print various indexes and table of contents. Is there a way to assign the page number to each record as the report pirnts? If no is there a better way? Thanks, |
#3
|
|||
|
|||
Saving page number from report
Thanks for your response,
Is there no way to place the page number in the table that report was printed from? Thanks, "Allen Browne" wrote: You can create a table for holding the page numbers. Then put code in the report's sections to write the values you need to that table. In the Report's Open event procedure, delete any existing entries in the table (from last time the report was run.), and OpenRecordset to append the values. In the Print event of the Detail section, AddNew to the recordset, to record the primary key value and page number or whatever you need. In the report's Close event, close your recordset. -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Phillip" wrote in message ... Hi, I have about a 200 page report that gets its data using every record in a table. I would like to have a field in each record for a page number and have the field filled as the report prints. I can then use that information to print various indexes and table of contents. Is there a way to assign the page number to each record as the report pirnts? If no is there a better way? Thanks, . |
#4
|
|||
|
|||
Saving page number from report
You can't get the page numbers into the table until the report pages have
been run, so the best you can to is to make another report as the table of contents. -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Phillip" wrote in message news Thanks for your response, Is there no way to place the page number in the table that report was printed from? Thanks, "Allen Browne" wrote: You can create a table for holding the page numbers. Then put code in the report's sections to write the values you need to that table. In the Report's Open event procedure, delete any existing entries in the table (from last time the report was run.), and OpenRecordset to append the values. In the Print event of the Detail section, AddNew to the recordset, to record the primary key value and page number or whatever you need. In the report's Close event, close your recordset. -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Phillip" wrote in message ... Hi, I have about a 200 page report that gets its data using every record in a table. I would like to have a field in each record for a page number and have the field filled as the report prints. I can then use that information to print various indexes and table of contents. Is there a way to assign the page number to each record as the report pirnts? If no is there a better way? Thanks, . |
#5
|
|||
|
|||
Saving page number from report
Hi again,
Let me ask another question: I have a form with a command button that calls the report. The form also has sort buttons that the user can click on to sort the form on various feilds before they print the report. Is it possible to have code in the form that would place the page numbers in the main table based on the sort button selected? The pages in the report are printed in the same order as the records shown on the form. It would be very easy for the indexing I want to do if I could get the page numbers in the main table. Thanks, "Allen Browne" wrote: You can't get the page numbers into the table until the report pages have been run, so the best you can to is to make another report as the table of contents. -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Phillip" wrote in message news Thanks for your response, Is there no way to place the page number in the table that report was printed from? Thanks, "Allen Browne" wrote: You can create a table for holding the page numbers. Then put code in the report's sections to write the values you need to that table. In the Report's Open event procedure, delete any existing entries in the table (from last time the report was run.), and OpenRecordset to append the values. In the Print event of the Detail section, AddNew to the recordset, to record the primary key value and page number or whatever you need. In the report's Close event, close your recordset. -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Phillip" wrote in message ... Hi, I have about a 200 page report that gets its data using every record in a table. I would like to have a field in each record for a page number and have the field filled as the report prints. I can then use that information to print various indexes and table of contents. Is there a way to assign the page number to each record as the report pirnts? If no is there a better way? Thanks, . . |
#6
|
|||
|
|||
Saving page number from report
It may be possible to do that, but that are many things that may may it
impractical, e.g.: a) Sections CanGrow or CanShrink, so you don't know how many records will actually fit on each page. b) You'd need to take into account the number of Group Header and Group Footer sections on each page. c) Many properties on the report may mess this up, e.g. Keep Together property of the sections, and the Keep With Next (or keep all together) setting for the group headings, or Page Break Before etc -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Phillip" wrote in message ... Hi again, Let me ask another question: I have a form with a command button that calls the report. The form also has sort buttons that the user can click on to sort the form on various feilds before they print the report. Is it possible to have code in the form that would place the page numbers in the main table based on the sort button selected? The pages in the report are printed in the same order as the records shown on the form. It would be very easy for the indexing I want to do if I could get the page numbers in the main table. Thanks, "Allen Browne" wrote: You can't get the page numbers into the table until the report pages have been run, so the best you can to is to make another report as the table of contents. -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Phillip" wrote in message news Thanks for your response, Is there no way to place the page number in the table that report was printed from? Thanks, "Allen Browne" wrote: You can create a table for holding the page numbers. Then put code in the report's sections to write the values you need to that table. In the Report's Open event procedure, delete any existing entries in the table (from last time the report was run.), and OpenRecordset to append the values. In the Print event of the Detail section, AddNew to the recordset, to record the primary key value and page number or whatever you need. In the report's Close event, close your recordset. -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Phillip" wrote in message ... Hi, I have about a 200 page report that gets its data using every record in a table. I would like to have a field in each record for a page number and have the field filled as the report prints. I can then use that information to print various indexes and table of contents. Is there a way to assign the page number to each record as the report pirnts? If no is there a better way? Thanks, . . |
Thread Tools | |
Display Modes | |
|
|