|
| [WD19] Trap the result of reading-process of a report |
| Iniciado por guest, 12,mar. 2015 09:44 - 5 respuestas |
| |
| | | |
|
| |
| Publicado el 12,marzo 2015 - 09:44 |
Hi all,
how (and where) can I trap the result of the reading process of a report ?
The help says: Note: This code returns True if there are still records to print and False if there is no record to print.
So can I trap this result so I can substitute the page header block before the next page ? Because the page footer doesn't fit on the page anymore and the page header must be substituted by another block with less controls.
Thank you for any tips and suggestions. |
| |
| |
| | | |
|
| | |
| |
| Publicado el 12,marzo 2015 - 15:17 |
| |
| |
| | | |
|
| | |
| |
| Publicado el 12,marzo 2015 - 21:11 |
Hi Stefan, afaik the printing process is a sequential process. So when the footer is about to be printed, the header of that same page is already rendered. You can't change it anymore.
So you need info at the time the header itself is printed. The only way to do so is looping through all records in the opening section of the report or even outside the report before it is started. And then gather your information like the number of records. Use this info then to change the header-height at the right moment, before it is printed.
I sometimes use code like this in the opening section of reports, based on queries.
FOR EACH MyReport..SourceName ... your code i.e. Trace({MyReport..SourceName + ".CustomerName"}) END HReadFirst(MyReport..SourceName) |
| |
| |
| | | |
|
| | |
| |
| Publicado el 13,marzo 2015 - 08:49 |
Hi Arie,
thanks for your tip. I will try that for sure. But I still don't understand the note in the helpfile about the result of the reading-process. |
| |
| |
| | | |
|
| | |
| |
| Publicado el 13,marzo 2015 - 09:03 |
Stefan,
I think it is used when doing a programmed read. And tell the report engine another new record has been read (true) or let it know there are no more records (false), after which the end-section is printed and the report is done. |
| |
| |
| | | |
|
| | |
| |
| Publicado el 17,marzo 2015 - 15:47 |
Hi Arie,
it works indeed, but there should have been a more simple way. Thanks anyway. |
| |
| |
| | | |
|
| | | | |
| | |
|