cancel
Showing results for 
Search instead for 
Did you mean: 

Print custom page range from Crystal Report Viewer

HML
Explorer
0 Kudos

We use Crystal Report Viewer 13 SP34 (32-Bit) in a .NET application.
When printing from preview the custom page range does not behave as expected:

HML_0-1712139296771.png

 

Selected Page RangeResult
any single page value (e.g. 3)page currently shown in preview window
single page range (e.g. 3-3) page currently shown in preview window
comma-separated selection (e.g. 1,2)error message "something went wrong"
combined selection (e.g. 1-2,3)error message "something went wrong"
page range selection (e.g. 1-2)prints range as expected

Can anyone confirm this problem and is there a solution?

Accepted Solutions (1)

Accepted Solutions (1)

DonWilliams
Active Contributor
0 Kudos

Hello,

What printer driver are you using?

My Print Dialog box looks like this:

DonWilliams_0-1712690529486.png

NOTE, if you are using Microsofts EasyPrint or Redirected Printer option it doesn't work 100%. The printer Driver MUST be installed on the PC that is doing the printing for CR to access the Registry key's for that printer.

I don't recognize that dialog box you posted.

Is it a PDF printer driver? Known issue with those drivers so you may need to contact the makers to get them to fix it.

Don

HML
Explorer
0 Kudos
Hello Don, sorry for late reply. I cannot assign this problem to the drivers only. First of all, the print dialog I showed is Windows 11. I assume the dialog you showed is Windows 10, right? In the meantime, I did some more tests. I tested PDF printers (PDF24, PDF Creator), redirected printers (Kyocera) as well as a directly connected printer (Lexmark C3326dw). Except for the forwarded printer, I did all tests on Windows 10 and Windows 11. The problem only appears on Windows 11! And I wonder why it always works correctly with MS Office, for example.

Answers (2)

Answers (2)

DonWilliams
Active Contributor

There were changes done in SP 35, see if that resolves the issue:

https://help.sap.com/docs/SUPPORT_CONTENT/crystalreports/3354091173.html

If it still doesn't work need more details:

Are you printing from the Viewer in your app?

Are you printing from the Embedded Report Designer in VS?

Does my printer test app work? Use a report with saved data:

Printing Crystal Reports in .NET

 

HML
Explorer
0 Kudos

Hello Don, this was the crucial hint! Using your app I have the same problem with "PrintToPrinter", but with "PrintOutputController" it works fine. I didn't know about the CrystalReportViewer.PrintMode until now! Thank you very much for your support!

DonWilliams
Active Contributor
0 Kudos

You are welcome...

The P2P API is a legacy mode designed when CR for VS was installed with Visual Studio back in VS6 days.

It's normal behaviour in what is called CR Basic, same as the Embedded report designer, has limited functionality, it uses the printer saved in the Report. You can test this by opening the report in CRD and hit the Print button, select the Printer and save the report. Next time your app should default to that selected printer.

Also the Viewers default printer API is P2P, using the routines in my test app uses the PrintOutputController (POC) and allows your users to select the printer of choice.