当宽度大于高度自动横向模式时,.rdlc报告打印

问题描述:

问题:我使用打印机zebra LP 2844将我在asp.net中创建的标签打印为microsoft Report。该报告的大小:宽度:7.5厘米,高度:5厘米。当我使用微软报表查看器中的打印按钮时,它会自动将方向设置为横向模式,切换宽度和高度==>宽度:5厘米高:7.5厘米。这导致报告使用4个标签而不是1垂直打印。任何建议的解决方案,或者之前有人遇到过这个问题,如果是的话我会感激任何帮助。



问候,

Ibrahim Karakira

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

尝试这些解决方法



http://social.msdn.microsoft.com/Forums / en-US / sqlreportingservices / thread / ef5f5e71-c4e5-459c-97e8-1483a981d654 [ ^ ]



HTTP:// neodynamic .wordpress.com / 2013/04/08 /工作环境换景观印刷-如果报告宽度是-b igger-than-height-in-reporting-services / [ ^ ]
Try these workarounds

http://social.msdn.microsoft.com/Forums/en-US/sqlreportingservices/thread/ef5f5e71-c4e5-459c-97e8-1483a981d654[^]

http://neodynamic.wordpress.com/2013/04/08/workaround-for-landscape-printing-if-report-width-is-bigger-than-height-in-reporting-services/[^]


这是解决方案,



只需创建报告并添加以下代码,然后在ReportViewer中打开报告。



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

ps.Landscape = False



ReportViewer1.SetPageSettings(ps)

Me.ReportViewer1.RefreshReport()
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()