One weird way I ended up doing something similar is:
1. print report to pdf file and use NitroPDF and setup rules to add
bookmarks based on where it finds certain fonts
so you use bigger fonts for group heading etc... and then NitroPDF makes a
bunch of bookmarks that serve as a table of contents
in a pdf file.
When I did it the client didn't need it totally automated so they basically
just use NitroPDF printer driver to print the pdf file.
I was a while ago so I don’t remember all the details, I think you need the
professional version of their product.
Sorry if this is not the route you want to go, but though I would mention
it.
Mark
"NevilleT" <(E-Mail Removed)> wrote in message
news:B53F0D4D-BF54-4CEB-9008-(E-Mail Removed)...
> I am not sure this can be done but I will ask the question anyway.
>
> I am creating a table of contents using the method suggested by Microsoft.
> By using the On Print event for the header, I write the header record and
> page number to a table, then read the table to create the ToC in a
> separate
> report.
>
> My problem is that I have to either print the whole report, or page
> through
> the report manually to create the records in the ToC table. If I can
> somehow
> do a print preview, then page through the print preview using VBA, I could
> create the table of contents records and run the ToC as a subreport. I
> can
> then print the report and the ToC will be where it should be - at the
> front
> of the report.
|