PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → WD19/20 - can I print a table of contents
WD19/20 - can I print a table of contents
Iniciado por guest, 15,sep. 2015 19:51 - 2 respuestas
Publicado el 15,septiembre 2015 - 19:51
Hi,
I need a table of contents for a pricelist.
Articles are printed, grouped by their article-group. Each article-group starts on a new page.
Is there a way to print the "table of contents" including pagenumbers?
Preferably the contents page must be printed before the actual content, the articles in this example.

Article group A - page 2
Article group B - page 5
Article group C - page 6
etc
Publicado el 15,septiembre 2015 - 21:32
Arie
What I have done is to store the Table of Contents in an array.
The tricky part is knowing how many pages each group requires.

I then use
iSequencingAdd(rptToc)

iSequencingAdd(rptGroup1)
Update the array
iSequencingAdd(rptGroup2)
Update the array

iSequencingPrint()

Of course 'rptToc' uses the array as its data source - if it is easier then you could use a memory table.
Publicado el 15,septiembre 2015 - 22:11
"The tricky part is knowing how many pages each group requires."
Yes that's exactly my problem.

I know, from a long ime ago, Crystal Reports used a "two-phase printing option".
I think there is no other way then print reports A, report B etc once to get the number of pages (stored in a global array or variables).
And then re-print it again together with the TOC.

Maybe a toc at the end of the reports is good enough for my customer. That would make it a bit easier. I have to ask them that first.