Skip to Content
avatar image
Former Member

Print RPT file with c#

Hi

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    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.

    Add comment
    10|10000 characters needed characters exceeded

  • 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.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    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;

    printout.PrintReport(rasprint);


    Add comment
    10|10000 characters needed characters exceeded