cancel
Showing results for 
Search instead for 
Did you mean: 

CR2020 viewer print output is incorrect when PrintMode=PrintOutputController....

grchen168
Explorer
0 Kudos
553

Using Crystal Reports 2020 viewer in my C# WinForm application, after the data is loaded into the report, the RPT is correctly displayed in the viewer. 

And, when setting Viewer's PrintMode=PrintToPrinter, and then, click the print button of the viewer, the print-out is also correct.      So far so good.

But, this time, when setting the Viewer's PrintMode=PrintOutputController, and then, click the print button of the viewer, the print-out is incorrect!!  That is, the top & left margin of the print-out is too much.

Why the viewer in printmode='PrintOutPutController' does not produce the same result as print mode='PrintToPrinter' ??

Or, under the circumstance of setting PrintMode=PrintOutputController, what other measures should I take in my C# code in order to instruct the viewer print output as the same as when setting viewer's PrintMode='PrintToPrinter'?? 

 

View Entire Topic
DonWilliams
Active Contributor
0 Kudos

What SP are you using and version of VS?

See if you get the same issue using my Printer test app:

Printing Crystal Reports in .NET

Save a report with data, open it in the test app.

Select the printer and Set Printer button.

See if that works.

Also note, you must set the Landscape/Portrait in your app, see the sample for more details

grchen168
Explorer
0 Kudos
The CR engine is v13.0.36, and VS is VS2015.
grchen168
Explorer
0 Kudos
And thanks Don's reply. But, as said, when the viewer's PrintMode='PrintToPrinter, then the viewer's print button can produce correct print-out. Question is : I just merely switch the viewer's PrintMode property value to 'PrintOutPutControl', why the print-out of the same viewer's print button can not be the same as when the property value is 'PrintToPrinter'?print-out by
DonWilliams
Active Contributor
0 Kudos

What is your default printer set to?

If you use my test app and select a real printer what does it do and show for margins?

DonWilliams
Active Contributor
0 Kudos
Mmmmmm... yes, send me your report with dummy saved data. I'll have a look at it and see if I can duplicate your issue...
DonWilliams
Active Contributor
0 Kudos

Thanks for the report, I see the problem...

CutePDF is not capable of using your margins when using POC.

In your screen shot of my test app notice the margins are set to 1 inch.

POC is only capable of setting/using .51 inch margins so it's adjusting the top of the page margin.

When I set it to .51, save the report now I see:

DonWilliams_0-1730815298131.png

The other issue is you are using a custom paper size.

Not sure if CutePDF is capable of using margins that small, you have them set to .394, POC is adjusting accordingly.

When saved and opening in test app note the change:

DonWilliams_1-1730815486596.png

And you have some custom paper size defined which is not a default paper size listed in CutePDF.

Bottom line is POC is not capable of using your default margins.

P2P is, because it uses the values saved in the report.

Nothing CR .NET POC can do, it's just how it works.

.51 is the minimum Margin POC can use, that adjusted by CutePDF alters the layout.

So when using this report always use the P2P API to print. Note also you can't adjust P2P printer info, that too is the norm.