4 weeks ago
Hello beautiful SAP community.
Little question please. is there a way to make CrystalReportViewer in C# WinForms support new Windows 11 Print preview dialog?
SoftwareMemo_0-1761240232334.png
Request clarification before answering.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So what you are saying is it doesn't work using Windows applications, correct?
quick test, create a test app that doesn't use CR runtime, just open any document and use Windows Print dialogs, does that work?
Nothing CR can do, post your question to Windows Forums...
Here's what I see using SP 38 and POC and the Snagit Print Preview, note, P2P doesn't show me a dialog box using my test app:
DonWilliams_0-1761831517709.png
Also note: CR .NET uses Windows default dialog boxes, there are 2 different ones as you've seen.
System.Drawing.Printing.PrintDocument pDoc = new System.Drawing.Printing.PrintDocument();
System.Drawing.Printing.PageSettings pPage = new PageSettings();
If you try my printer test app, and it will need to be updated according to my Blog:
If you don't get what you want using that test app it's not a CR issue...
Use a report with saved data and set the default printer to Snagit.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
POC from your original post (PrintOutputController) not PrintToPrinter
Sorry: Edited it. It should be POC not P2C that I mentioned. Yes its PrintOutputController new print mode from Crystal Reports.
SoftwareMemo_0-1762233904522.png
I try PrintOutputController. it only give custom crystal reports Print Dialog not windows 11 Print Dialog. So the PrintToPrinter is give a Windows 11 Dialog. but Crystal Reports doesn't support Windows 11 New Print Preview Dialog.
SoftwareMemo_0-1762233579039.png
SoftwareMemo_1-1762233597715.png
I don't know if this issue belong to Windows 11 itself. Because Native apps doesn't support this feature also.
I also try from Notepad.exe
SoftwareMemo_2-1762233748470.png
Same for Paint.exe
SoftwareMemo_3-1762233793425.png
I assume Windows 11 Print Preview dialog. confuses users.
many customers think the problem from crystal reports. IDK why actually Microsoft Windows added new print preview dialog?
Or if Crystal Reports can support it will be great for non technical users.
First thing I suggest is to upgrade to SP 38, the Viewer in SP 37 has a lot of issues.
You didn't answer directly so asking again, is this a WEB app?
If it is then possibly you need to use Sessions and PostBack functions, see this KBA:
https://userapps.support.sap.com/sap/support/knowledge/en/1985571
This keeps IIS using the same Report in session and any communications within the PostBack method.
The issue is CR can't directly communicate with IIS to pass the Preview back to the client. CR can't generate the page until the report is processed.
If it's a desktop app then I tested it using the latest Snagit and all I see is the Snagit's print preview.
And yes, using P2P is CR Basic Printer function, to have more control you should use POC API.
See my sample printer app on this page:
https://help.sap.com/docs/SUPPORT_CONTENT/crystalreports/3354091173.html?locale=en-US
Printing Crystal Reports in .NET
Select the printer, Set Printerand then using POC button to print, see if that works for you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What SP are you using? Look in Programs and Features for CR for VS version.
What version of Snagit are you using?
Are you using PrintOutputController() or PrintToPrinter()?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In my C# App i keep CrystalReportVIewer.PrintMode default no changes to it. So i Think its PrintToPrinter.
Hello Don, I use SP37, I use CrystalReportViewer and click on built-in Print button. https://prnt.sc/HLRke0B7AgqI
SoftwareMemo_1-1761383841298.png
Please note. All printers/Microsoft PDF, etc doesn't support Print View within CrystalReportViewer. see image: https://prnt.sc/WMzsM8VLHjpw
SoftwareMemo_2-1761383855325.png
The Print Preview dialog only works from Web Browsers ( Chrome, Edge, Firefox,) so the exported PDF will work. But CrystalReportVIewer itself doesn't support Print View? can SAP solve that?
SoftwareMemo_0-1761383981430.png
| User | Count |
|---|---|
| 14 | |
| 8 | |
| 6 | |
| 6 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |