What event to use between preview and print?
I want to allow users to see a form filled in with data on print preview but
I don't want to actually print the form layout to the printer. In other
words I want them to see on screen a completed form using colour, graphics,
shapes etc, but only actually print the text of the form...
I have experimented with the BeforePrint event trigger and have proven that
I can enable or disable display of certain objects in code - it works
well...
The only problem I have is identifying a consistent event handler that I can
use to trigger the necessary code. Ideally it needs to fire immediately
before printing to the printer - to ensure it works with screen preview
enabled AND disabled. What would you suggest?
Advice gratefully appreciated...
I don't want to actually print the form layout to the printer. In other
words I want them to see on screen a completed form using colour, graphics,
shapes etc, but only actually print the text of the form...
I have experimented with the BeforePrint event trigger and have proven that
I can enable or disable display of certain objects in code - it works
well...
The only problem I have is identifying a consistent event handler that I can
use to trigger the necessary code. Ideally it needs to fire immediately
before printing to the printer - to ensure it works with screen preview
enabled AND disabled. What would you suggest?
Advice gratefully appreciated...
This discussion has been closed.
Comments
if ppReport1.DeviceType = 'Printer' then
Don't print what you need
DeviceType is set to Printer even when doing a screen preview!
However, have now found that I can do the same from the OnPrintDialogClose,
which works so thanks for pointing me in the right direction!
Any other suggestions