Not Print detail but

  • Thread starter Thread starter A Hopper
  • Start date Start date
A

A Hopper

I would like to offer users the option of a "Removed At
Analysis" report with and without the detail section
because the detail section has several pages of
information that some users do not need. My problem is
that I have a "JobNumber" Footer that contains summary
information from the detail section (totals, percentages
etc.) which I want on both versions of the report.
Information in the Detail section comes from code in it's
On Print event and is placed in unbound text boxes. As a
test I made the Detail section permanently not visible
through properties, but then I do not get any information
in the "JobNumber" Footer section. I assume this happened
because when I made the Detail section not visible it will
not print and the information in the On Print event is not
created. Is there code I can use in the On Print event of
the Detail section that will allow the information to be
created but not printed?
Do I have to create a new report give both options?

I would like to give the user the option through a message
box in the On Click event of the "Print Report" command
button on the "Analysis Dialog Box" form.

Thanks for your help

Allan
 
You might try this:

Rather than setting the report's detail section to not be visibile add code
to the On Print section; following (ie. after your calc code)

If Forms!MyForm!chkPrintDetail = False Then
Me.PrintSection = False
Else
Me.PrintSection = True
End if

See if that gives you the results you need because the printing
determination would happen after you've done the calcs. Too, you might want
to store the values of the calcs in a report module level variable rather
than solely in a control and in your Job footer, have the total control be
an unbound control and in the On Print event there, assign the value of the
variable to the control. (Remember to reset the mod level variable to 0 in
the Job Header.....)
 
Back
Top