Skip to Content
avatar image
Former Member

CR printing from VS.NET windows srvce can page orientation default to what was saved in report?


When printing the crystal report I now have to use this method to get the printer name set for the report:

Report.PrintToPrinter(printerSettings, pSettings, False, PrintLayout)

It would be preferable to have this default to use the page orientation that was saved off in the report.

Is it possible to do that or do I need to set it in these two places every time?

Report.PrintOptions.PaperOrientation = CrystalDecisions.Shared.PaperOrientation.Portrait

pSettings.Landscape = False

If I do need to set it every time do I need to set it in both places, just one of these places or in another setting?

In the past when I was using Crystal Runtime Engine 2008 I was able to use

Report.PrintToPrinter(1, False, 1, 1) and it would print in the orientation that was saved in the report.

Thank you,

Michael Helduser

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    May 02, 2017 at 04:38 PM

    Use PrintOutputController() to do the printing for reports with saved printer names etc.

    Updates to these functions altered the way PrintToPrinter(0 works, it will only use the PC's default printer settings now.

    You can also change the default printer API in the Viewer to use either P2P or POC as the default. POC uses the same printer UI CR Designer uses.

    See KBA 2163438 for an example on using them.

    Updating the reports will also save the printer and paper info in the RTP file now as well so be sure to update to the latest patch for your full version of CR 2008 SP 7 or higher Designer.


    Add comment
    10|10000 characters needed characters exceeded