PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → Reports windev
Reports windev
Iniciado por guest, 10,feb. 2015 17:00 - 3 respuestas
Publicado el 10,febrero 2015 - 17:00
Hi

I have a report with a content page. This page displays the titels of the pages that follow.

For instance

Balans sheet
Profit and Loss

Ok Behind the title I want to print the pagenumber of the section where the title refers to. The report has internal reports. The pagenumber is displaye through the pagefooter of the mainreport

I am not able to get the value for itis generated based on the content of the report.

I tried this:

Item-page-balnssheet = mainreport.discriptionsubreport.pagenumsureport. But that gives me the value of 0 since the page has not been created when I print ( create ) the content page .

Anyone an I dea how to get this?

Thanks

Allard
Publicado el 11,febrero 2015 - 14:37
Hi nobody,

This should be possible ?

Please help me out


Thanks

Allard
Publicado el 11,febrero 2015 - 15:38
Hi Allard,

I have no experience in this, but I think of a few things:

1. Try to read the page numbers and position in the "End of document" block and do something with it (like building your index in that very block inside a RTF control, or a sub-report integrated in the end-block to which you pass the collected data. If at the end of the report you can get the page numbers, this could be possible to do it that way. <a class="ExternalLink" rel="nofollow" target="_blank" href="http://doc.windev.com/en-US/?1011004&name=sequence_processes_associated_with_the_reports">http://doc.windev.com/en-US/&hellip;</a>

2. Print your index at the end of your report, then at that point you should (?) have all the information desired to do that.

3. Print your report and collect data while doing so. Then print your report again including the index containing the data from the previous dry-run.

Since I never made that, I can't guaranty there is a better way. But hopefully something in the above could help you going forward.

Best regards,
Alexandre Leclerc
Publicado el 11,febrero 2015 - 17:16
Allard

Running the report twice is your only option to capture the number of pages each section has required.
Use iDestination() - Possibly to XML - You may be able to read the page() from this.
If not you will need to store this information - possibly an array.
Using iSequenceAdd() will ensure the order.

Now run the whole thing again but this time the first iSequenceAdd() will be for a report based on the collect page information.

Another thought.
Does this need to be report with preview etc or can it be produced as a pdf ?

If a pdf is acceptable then create run the report as normal to pdf, collect the info as above.
Generate a second a second pdf using this information and then use PDFMerge() to generate a single document.