cancel
Showing results for 
Search instead for 
Did you mean: 

Crystal Reports (SP37 Windows 11) Orientation Setting not working

andreassammer
Explorer
0 Kudos
102

Hi,

A customer of us has problems printing Labels in the Orientation he wants.

He uses a helper Program to read out the Report Orientation to use as Printer Setting. The Report has the Orientation set to Landscape, but the read out Value is Portrait.

Report Page Setting:

grafik.png

The C# Source used to read the Value is:

report = new ReportDocument();
report.Load(reportPath);
var reportOrientation = report.PrintOptions.PaperOrientation;
// Alternate way to get the orientation
var reportCOrientation = report.ReportClientDocument.ReportDocument.PrintOptions.PaperOrientation;

Both ways return Portrait instead of Landscape. Does anyone know of another way to read the real Page Setting set in the Report for the Orientation?

 

Accepted Solutions (1)

Accepted Solutions (1)

DonWilliams
Active Contributor

That is odd, It works using this:

// this info is saved in the RPT file
if (rptPRT.PaperOrientation.ToString() != "crPaperOrientationPortrait")
{
    PROrientation.Text = "LandScape";
}
else
{
    PROrientation.Text = "Portrait";
}

Seems it should work your way.

Looking at your Page Setup you have No Printer checked on, CR still gets the paper orientation though.

What is your default Printer?

Some MS product don't support landscape....

When Printing Labels you should always set the Printer to a real printer when designing the report.

See my Blog on using Label Printers:

https://community.sap.com/t5/technology-blogs-by-sap/printing-crystal-reports-custom-paper-sizes/ba-...

And see if my Printer Test app works for you:

Printing Crystal Reports in .NET

In short create a custom paper size and use a Common name for it, then create the custom paper size on every printer. CR saves that name in the RPT file and it will look for the Name and then the ENUM for the custom paper size. Don't sue No Printer, that uses the screen driver to format the page.

 

Answers (0)