Y
YisMan
Hi Everybody,
I'm trying to set up a report so that everytime its printed it is also
outprinted to a file. I'm using the reports activate/deactivate events to
check if it's actually being printed.
Now, in the reports close event I would like to have itself outputted to a
file with the OutputTo method. The problem is, it does not seem possible to
run a report when said report is in middle of running code (specifically, the
Close Event code).
If i try i get an error 2585 -this action cannot be carried out while
processing a form or report event.
The question is, how can this be bypassed? I came up with a few ideas, but
they're all pretty clumsy.
1. Make a table and insert there every report that needs to be outputted and
have a timer spit them every few seconds
2. Maybe store it in a global variable and also have a timer.
3. Disallow printing from preview and only use my own code which also prints
and also outputs.
#1 & #2 are no good because of much to much overhead. Timer every few
seconds. DB reads, writes and deletes all the time (for #2). aside of that it
seems error prone.
#3 is not very user friendly, to say the least.
I'd appreciate if anyone has a good idea and willing to share it.
Thankfully,
YisMan
I'm trying to set up a report so that everytime its printed it is also
outprinted to a file. I'm using the reports activate/deactivate events to
check if it's actually being printed.
Now, in the reports close event I would like to have itself outputted to a
file with the OutputTo method. The problem is, it does not seem possible to
run a report when said report is in middle of running code (specifically, the
Close Event code).
If i try i get an error 2585 -this action cannot be carried out while
processing a form or report event.
The question is, how can this be bypassed? I came up with a few ideas, but
they're all pretty clumsy.
1. Make a table and insert there every report that needs to be outputted and
have a timer spit them every few seconds
2. Maybe store it in a global variable and also have a timer.
3. Disallow printing from preview and only use my own code which also prints
and also outputs.
#1 & #2 are no good because of much to much overhead. Timer every few
seconds. DB reads, writes and deletes all the time (for #2). aside of that it
seems error prone.
#3 is not very user friendly, to say the least.
I'd appreciate if anyone has a good idea and willing to share it.
Thankfully,
YisMan