G
Glenn
hi all,
as the subject states, my problem lies with incorrect subtotals on
report printed after they are previewed. (access 2000)
the subtotals are the result of a custom function
simplified report event description:
in: report_open
n_sum = 0
in: detail_print
n_sum = n_sum + f_calc_Sum(params)
'calc sum depends on diff. parameters - not straightforward sums
---------
this works fine if the report is directly printed. if previewed, and the
user is so kind to go throught every page incrementally, it is fine
also.
but if the report is printed after the user has previewed it, access
goes through every sum again. the result is doubled intermediate & end
sums.
--------
i've searched for a way to detect the print command and reset the
variable n_sum, but was unsuccesful.
searching on usenet showed many similar questions, but with no
convenient answers.
My report is too complex (and finally works
to modify its structure
significantly (other queries/temp. tables and such)
I do not understand how the PrintCount parameter, suggested by some,
could help. the help states that it is reset each time a new section is
printed. so losing any link to a previous situation.
Now, my only real solution is to present the user a (hopefully) clear
warning not print after previewing.
come on, you can do better
glenn
as the subject states, my problem lies with incorrect subtotals on
report printed after they are previewed. (access 2000)
the subtotals are the result of a custom function
simplified report event description:
in: report_open
n_sum = 0
in: detail_print
n_sum = n_sum + f_calc_Sum(params)
'calc sum depends on diff. parameters - not straightforward sums
---------
this works fine if the report is directly printed. if previewed, and the
user is so kind to go throught every page incrementally, it is fine
also.
but if the report is printed after the user has previewed it, access
goes through every sum again. the result is doubled intermediate & end
sums.
--------
i've searched for a way to detect the print command and reset the
variable n_sum, but was unsuccesful.
searching on usenet showed many similar questions, but with no
convenient answers.
My report is too complex (and finally works
significantly (other queries/temp. tables and such)
I do not understand how the PrintCount parameter, suggested by some,
could help. the help states that it is reset each time a new section is
printed. so losing any link to a previous situation.
Now, my only real solution is to present the user a (hopefully) clear
warning not print after previewing.
come on, you can do better
glenn