Skip to Content
author's profile photo
Former Member

Problem Printing Landscape from Customized Print button

Post Author: mel

CA Forum: .NET

I am having difficulty printing a document in landscape via a customized Print button. I have defined the report page orientation as landscape design time. I have a report options form that has both a View and a Print button. If I view the report via the View button and then use a customized Print button (located on the form that displays the report using a report viewer), then the report prints out landscape. However, when I use the same code to print the report via a customized Print button on the report options form without actually displaying the report to the screen, the report prints out Portrait. The code that I am using to print the report is crv.PrintReport where crv is a CrystalReportViewer. Can anyone please help me?

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Best Answer
    author's profile photo
    Former Member
    Posted on Nov 19, 2007 at 01:24 PM

    Post Author: omejaap

    CA Forum: .NET

    Same problem here as well, but im afraid we're dealing with a bug here: the philosophy is that all report settings are extracted from the rpt file, I think that the paper orienatation has simply be forgotten to be taken into account in this particular case. Then again im new at this (im currently working on my first crystal report application.)A potential workaround could be to get the default printer settings from windows, record its current default orientation, set its default orientation to landscape, perform the printreport() operation, and restore the printers default orientation. But even besides potential user rights problems this seems like its a little far-fetched. For now, I will rely on my users to set the printer to landscape themselves, but im keeping an eye on this thread in case anyone comes up with a solution.

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Posted on Nov 13, 2007 at 08:26 PM

    Post Author: almander

    CA Forum: .NET

    I am having the exact same problem. And I can't find a way to get around it.

    Anyone have any suggestions?

    Add comment
    10|10000 characters needed characters exceeded