Winprintviewer Properties
Am I missing a switch or property in the winprintviewer.exe that will disable the 'Cancel Reading Records' button? I am using mainly VDF 15.1 and I have also tried in VDF 16.1. I have set the report property to Allow_Cancel_State to false. The status panel has the cancel button disabled but when using Print_To_Window (viewer) the stop button will stop the report. This is an obvious problem if the report is an update process.
I have also tried using the Deferred_Print_To_Window option. This would work except that the print button is then disabled in the report viewer. Again, I tried the EnablePrintFromPreview setting and it had no effect.
Does anyone know of a way to get one or both of these choices to work properly?
Re: Winprintviewer Properties
refactor your code, so the update process is not in a winprint loop.
If you have a requirement to print as part of the update, write the "log" of the committed updates to a db table, and report from that. By doing this you can re-print the report if the paper jams in the printer, and you don't need to fret about winprint...
Just my 2 cents worth.
Re: Winprintviewer Properties
I agree. Keep it simple and do one thing at a time.
Re: Winprintviewer Properties
I agree that all that additional work is a possible solution. However, setting a property to disable the 'stop' button in the viewer ... Now that is simple.
Re: Winprintviewer Properties
But it won't help if the printer jams mid process. ;-)
Re: Winprintviewer Properties
Putting the philosophical debate about system design aside, I still would like to get an answer to my original question. Is it possible to disable the 'stop' button in the winprintviewer? Maybe someone from DAC can weigh in and give a definitive answer.
Re: Winprintviewer Properties
Just wanted to bump this message again. I still would like to get an answer to my original question. Is it possible to disable the 'stop' button in the winprintviewer? Maybe someone from DAC can weigh in and give a definitive answer. Somebody has to know this. It certainly seems like a simple question.
Basically, the property Allow_Cancel_State SHOULD control the viewer also. How about it DAC, is this a bug?
Re: Winprintviewer Properties
It does sound simple...
Have you experimented what happens in the WinPrint Viewer when you click the [X] close button in the Viewer Window? I mean the top left hand red [X] close button...
When you click that button to close the window, while the report is still generating, it has the same effect as clicking the Stop button. i.e. it stops the report and closes the Viewer Window.
If we were to support disable the "Stop" button (easy) how should the Viewer Window react if someone click's the "[X] close window" button? Should that also be disabled? If so, should it become automatically enabled once the report has finished generating (at some point there needs to be a way to close this window).
I want to see if there is a consensus about this. What would be the expected behavior. Would it seem weird that a window's close button is disabled, or even invisible, then later appears. It seems a bit weird to me, and I am also not quite sure if that would be possible.
thoughts?...
John van Houten
Data Access Corporation
Re: Winprintviewer Properties
Currently is is not possible to do what you ask. We would have to modify WinPrint to support this. See also my reply above...
regards John van Houten
Data Access Corporation
Re: Winprintviewer Properties
These sorts of considerations show the basic flaw in networpl's approach. Reports should report. If you want data to be processed use a business process.