on 2024 Oct 30 9:43 AM
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'??
Request clarification before answering.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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:
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:
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.
User | Count |
---|---|
74 | |
30 | |
9 | |
7 | |
7 | |
6 | |
6 | |
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.