Report Detail OnPrint -- Does it occur for each value/page?

G

G

I am trying to understand a bit more about the OnPrint event of a
report detail.
Does it occur for each new detail section in a report?
In my situation, the report detail is sized so that each value in the
underlying query is on a new page. Would OnPrint occur each time the
page in printed/previewed?
I am using Onprint to apply some conditional formatting and set the
value of an unbound checkbox. I get the desired result on some pages,
but do not get the desired result on others.

Any ideas?

Let me nkow if there is more info that would help.

Thanks.


G
 
A

Allen Browne

The Detail section's Print event occurs for each record as the report is
previewed or printed.

If you do not print all records (e.g. if you just print page 5 of the
report), the events may not occur for the pages you did not preview/print.
You certainly cannot rely on these events occuring. For example, it is not
safe to use this event to accumulate a total that you want to show at the
end of the report.
 
G

G

Allen said:
The Detail section's Print event occurs for each record as the report
is previewed or printed.

If you do not print all records (e.g. if you just print page 5 of the
report), the events may not occur for the pages you did not
preview/print. You certainly cannot rely on these events occuring.
For example, it is not safe to use this event to accumulate a total
that you want to show at the end of the report.

Allen,
Thanks for the response.

Is OnFormat the more appropriate event? Is all of the data available to
the report at OnFormat?

Open (report) Activate (report) Format (report section) Print (report
section) Close (report) Deactivate (report)

The report contains 1 subreport. The main report and subreport are
built on two separate queries.

Should will the OnFormat of the subreport occur before or after the
main report?

Thanks for the response!

G

--
 
A

Allen Browne

None of the events of the report's sections can be relied on to fire for the
pages you don't print/preview.

What are you trying to do in these events?
 

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