Click here to Skip to main content
15,889,200 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Problem: I am using the printer zebra LP 2844 to print labels that I created in asp.net as microsoft Report. The Report has the size: width:7.5cm and height : 5 cm. when I use the print button in the microsoft report viewer it automatically sets the orientation to landscape mode switching the width and height ==> width:5cm height: 7.5 cm. this causes the report to be prints vertically using 4 labels instead of 1. Any proposed solutions, or did anyone face this problem before, if yes I would appreciate any help.

Regards,
Ibrahim Karakira
Posted
Updated 21-Mar-19 1:13am

Here is the solution,

Simply create the report as you wish and add following code before opening the report in ReportViewer.

Dim ps = New System.Drawing.Printing.PageSettings()
ps.Landscape = False

ReportViewer1.SetPageSettings(ps)
Me.ReportViewer1.RefreshReport()
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900