Skip to Content

Print RPT file with c#

Feb 15 at 06:41 AM


avatar image


I am using PrintOutputController method to print RPT file.

For some reason, the text has issues with Right to left and alignments.

What can cause this scenario?

I am using CR 13 sp21

By the way, when i use direct print (reportDocument.PrintToPrinter(1, false, 0, 0), it comes fine but i takes 30 seconds to finish.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Best Answer
Don Williams
Feb 23 at 10:39 PM

Hi Natalie,

I escalated your case to R&D:

B1 Incident 84098 / 2018 / CR Print label using c# alignment issue

KBA - 2608379 - When printing Right To Left fields using the PrintOutPutController in a Cr for VS .NET application it is ignored and prints left justified.

Should be fixed in SP 23 due out end of May.

10 |10000 characters needed characters left characters exceeded
Ido Millet Feb 16 at 05:25 PM

Same behavior even when printing to a PDF printer? Yes, that means a manual dialog in the middle, but this is just for troubleshooting.
If so, please upload the rpt with saved data so it would be possible to replicate.

10 |10000 characters needed characters left characters exceeded
Natalie Cohen Feb 16 at 06:10 PM

Hi Ido, thanks for the answer.

1) Exporting to PDF is just fine.

2) Printing using native method: reportDocument.PrintToPrinter(1,false, 0, 0), is just fine (but VERY slow).

By Using PrintOutputController, it is printing fast , but the alignment nor RTL (right to left) is getting messy..

I am not able to upload here, it block RPT files.

This is my code:

ISCDReportClientDocument rptClientDoc;

PrintOutputController printout;

PrintReportOptions rasprint = new PrintReportOptions();

CrystalDecisions.Shared.PrintLayoutSettings PrintLayout = new CrystalDecisions.Shared.PrintLayoutSettings();

rptClientDoc = reportDocument.ReportClientDocument;

printout = rptClientDoc.PrintOutputController;

rasprint.PrinterName = printerName;


10 |10000 characters needed characters left characters exceeded