Subject Re: Reports: mark date record printed
From Mervyn Bick <invalid@invalid.invalid>
Date Thu, 27 Aug 2015 22:54:28 +0200
Newsgroups dbase.getting-started

On 08/27/2015 03:58 PM, Randy Waldman wrote:
> Hi - Pro 9.5.1 report generator - I am doing a form letter.  Where (ie: in what property, event or method) can I put code to mark each record with a "date sent" (as the letters are printed).
>
> thanks, randy
>

You should be able to use the detailband's onRender event handler to
place the date in a field in the table.  The report designer sets the
query's requestLive property false as a default so you will need to
change that to true to be able to save to the rowset.

It would probably be a good idea to execute the query's save() method
after the date has been placed in the field.  Normally moving to the
next record would force an implicit save but, without an explicit save
each time, the last record may not get written.

This will not work if you are using a query with a JOIN in the SQL
statement.  An ORDER BY clause will also render the query read-only
unless the order is on one field only and there is a simple index on the
field.  The index need not be used, it just needs to exist.

Mervyn.