Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to trap after a report has been printed?
Message
De
10/04/2013 10:48:07
 
 
À
10/04/2013 07:21:27
Information générale
Forum:
ASP.NET
Catégorie:
Windows Presentation Foundation (WPF)
Divers
Thread ID:
01570496
Message ID:
01570607
Vues:
25
>>>>>Hi,
>>>>>
>>>>>I've got a reportviewer in a XAML form used to display reports. I want to prompt the user after they have printed the report. I can trap when the user clicks the Print button on the Print Dialog using the ReportViewer.PrintingBegin but I would like to actually trap it when the printing has finished in order to as if the printing was successful. (I need to tag when an invoice gets printed.)
>>>>>
>>>>>Any ideas on how to do this? I've not had much luck searching.
>>>>
>>>>You don't say what ReportViewer you are using but I'm assuming it's the WinForms one? If so then I don't see much either. Of course the real problem is that you cannot know whether the report was actually printed successfully - all you can know is that it was spooled.
>>>>
>>>>Maybe you can somehow check the status using the PrintSystemJobInfo class - but I've never tried it......
>>>
>>>Yup, using the winforms report viewer. What I want to do is after the user has hit the Print button in the dialog and the report sent to the spooler, prompt the user if the report printed properly and if so, then I'll update a table. For now, what I am doing is showing the reportviewer in a modal form and when it is closed I ask the user if it printed.
>>
>>I've never used the ReportViewer. Do you get access to the PrintDialog directly. If so is this the Winforms (System.Windows.Forms.PrintDialog) or the WPF (System.Windows.Controls.PrintDialog) version ?
>
>From what I can see I can trap when the user hits the Print button in the print dialog, not much else. How do I tell which version of the Print Dialog?

If you can get a reference to it in the debugger that will tell you. Also the WPF version has 'PrintTicket' and 'PrintQueue' properties which Winforms doesn't have....
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform