Run report in but 'print' whole report (1 Viewer)

GoodyGoody

Registered User.
Local time
Today, 18:42
Joined
Aug 31, 2019
Messages
120
Hi, I am running Access 2013. I am writing a Race Timing database and when it comes to printing the times for a race I have a report which saves all the runtime data to a table so that when summarising the results later for e.g. a series of races (and also for historical purposes) the data is set. I have a process to 'Finalise' the race results which 'prints' the report using the docmd.openreport VBA command and the acHidden parameter. This all seemed to work really well until I noticed that the report when run in acHidden mode onlly updates the first page of times (I also noticed that when it prints to the screen, it only updates the records once it has printed in Preview to the screen so if you only preview page 1, then only the records on page 1 are updated). Is there any way I can force the docmd.openreport command to effectively 'print' every line on the report thus updating all the records or am I going to have to hive off the database update process part of the report to a separate procedure which will be a pain as the report does a bunch of calculations...

As always your thoughts always really welcome.
Thanks
Stephen
 

theDBguy

I’m here to help
Staff member
Local time
Today, 10:42
Joined
Oct 29, 2018
Messages
21,449
Hi Stephen. Just a thought, since I am not sure why you're doing all the calculations on the report, if you're saying the report has to be printed before all calculations are completed, then maybe try the OutputTo method to print the report into a PDF. Hope it helps...
 

GoodyGoody

Registered User.
Local time
Today, 18:42
Joined
Aug 31, 2019
Messages
120
Well, the report is calculating things like position overall, position within gender and position within gender category as well as various other things which are just difficult to do on a line by line basis in SQL. Since they will want to print the report anyway it makes sense to save the data when they print the report. The trouble is the whole report has to be printed. I've not used the output to method before but I'll check it out thanks.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 10:42
Joined
Oct 29, 2018
Messages
21,449
Well, the report is calculating things like position overall, position within gender and position within gender category as well as various other things which are just difficult to do on a line by line basis in SQL. Since they will want to print the report anyway it makes sense to save the data when they print the report. The trouble is the whole report has to be printed. I've not used the output to method before but I'll check it out thanks.

Hi. All I was saying was what if you or your users need a new report layout for the same information? It could mean you'll have to duplicate those calculations in the other report again. In any case, I hope running OutputTo first helps.
 

Users who are viewing this thread

Top Bottom