on 2025 Mar 11 5:07 AM
Please tell us how to print only one specified page from a multi-page document
using Crystal Report Viewer in a Windows 11.
Printing is done by selecting the [Print] button in Crystal Report Viewer.
To print, use the Windows print dialog to specify the pages.
We want to print the page we want to print without previewing it in Crystal Report Viewer,
but even if we specify a page, the previewed page gets printed.
We can print multiple pages as specified, but we cannot print just one page.
Our development environment is as follows.
Windows 11 Pro(23H2)
Microsoft Visual Studio 2022(64bit)Version 17.13.0
Microsoft .NET Framework 4.8
SAP Crystal Reports 2020 SP4 Patch100(64bit)
SAP Crystal Reports, version for Microsoft Visual Studio(SP37)(64bit)
SAP Crystal Reports for Visual Studio(SP37) CR_runtime(64bit)
SAP Crystal Reports for Visual Studio(SP37) Merge Modules(64bit)
In addition, in a Windows 10, we could print just one page.
Request clarification before answering.
Hello,
OK now I see the new Windows 11 print dialog box, not sure why when I googled it the first time nothing was found...
I suggest moving back to the legacy Dialog boxes, I doubt R&D has done anything to use the new one. Therefore there is no way to set the values in code and you are limited to what the New Printer UI allows, it could be a bug in Microsoft's UI, you'll have to ask MS how to set values....
To set it back to the original see this https://www.winhelponline.com/blog/restore-legacy-print-dialog-windows-11/
FYI - Using the CR Basic to print reports doesn't work that well to make changes to the printer saved in the RPT File. I suggest you have a look at my printer test app to use the PrintOutputController() to set printer info, it does require using RAS to open the report object. My sample shows you how to do this.
I will ping R&D and see what they say about it and if there are any plans to integrate it into CR's Printer dialog boxes.
Sorry about not seeing this sooner...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
More info from SAP R&D:
In the Project you can change the default print button to use PrintToPrinter or PrintOutputController:
Info from R&D:
In Page Range, if you specified the single page number, then it will always printed out the current viewing page in the viewer. But if you specified the page range, it could successfully print out the correct pages.
The PrintOutputController print dialog works well on Win11 24H2 since it’s used our CR print dialog, and also CRW works well.
As workaround, user could change to use PrintOutputController printmode in winform viewer, there’s registry:
Add "PrintMode" as String value:
Or User could add below registry key value to switch to the legacy print dialog for All app:
[HKEY_CURRENT_USER\Software\Microsoft\Print\UnifiedPrintDialog]
"PreferLegacyPrintDialog"=dword:00000001
There's already lots of discussions regarding new print dialog in Win11 on internet and you could see there are many issues with it.
R&D will continue to look into a possible fix or wait to see if Microsoft "fixes" anything.
So for now all SAP can suggest is to not use the new Windows Dialog box and move back to the legacy dialog boxes.
Thanks again
Don
User | Count |
---|---|
92 | |
11 | |
9 | |
8 | |
7 | |
5 | |
4 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.