How do I write the print date on data row?

D

Dennis

Hi,

I need to run a report once a month. When I run that report, I select all
unprinted record / row and print them on the report. When I print the record
/ row I want to date stamp the row with the Report's print month (Jan-2009,
Feb-2009, etc).

This will do two things for me. One, this field will flag that the row has
been printed. And two, I can recreate any prior month report by select all
rows with that month's "print month".

I know I can run a Update Query before the report is run, but then I don't
know for a fact the that record was printed. I just know that the query was
run.

I know that I have to update the current row, but I don't know how to code
that. I'm assuming that I would put it on the Detail section's On Print
event.

Thank you for your assistance.
 
D

Dorian

There is no way to tell if a report was actually printed.
You will have to be satisfied with it being RUN. And of course it is
possible it could be run many times or never at all.
Your technique will also not work if rows that were previously 'printed' get
deleted.
You can save reports that are run by writing the report's data to a table
and then printing the table. You rerun the report from the saved table. Each
time a new report is run, it creates a new table. This is a technique I have
used in the past.
-- Dorian
"Give someone a fish and they eat for a day; teach someone to fish and they
eat for a lifetime".
 
M

Marshall Barton

Dennis said:
I need to run a report once a month. When I run that report, I select all
unprinted record / row and print them on the report. When I print the record
/ row I want to date stamp the row with the Report's print month (Jan-2009,
Feb-2009, etc).

This will do two things for me. One, this field will flag that the row has
been printed. And two, I can recreate any prior month report by select all
rows with that month's "print month".

I know I can run a Update Query before the report is run, but then I don't
know for a fact the that record was printed. I just know that the query was
run.

I know that I have to update the current row, but I don't know how to code
that. I'm assuming that I would put it on the Detail section's On Print
event.

Run the Update query, then open the report as if the current
month is just another prior month.
 
D

Dennis

Dorian,

You have a valid point about know whether or not the report was actually
printed because the job can get lost / destroyed in the spooler or on the
printer.

However, we differ on the remainder of your comment. I always designs my
systems so that if a record / row is date stamp, there is no way the system
allows the user to delete that transactions. Yes, someone can manually go
around the system and manually delete the data, but from a auditing procedure
standing point that is not allowed.

You can make the same comment about the approach you described. If someone
deletes a row from a saved file, then the report will no longer be the same.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top