在风景模式下输出.rdlc为PDF报告 [英] Export .rdlc report to pdf in Landscape mode

查看:687
本文介绍了在风景模式下输出.rdlc为PDF报告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的报告的属性被设置为宽度11in和高度8.5英寸我的身体属性被设置为10英寸的宽度和高度7.5in和利润都为0,但报告一直处于纵向模式显示。谁的人codeD上的网页使用正被弹出的一个JavaScript弹出窗口写响应PDF格式的aspx页面内ReportViewer控件。如果报告在报告查看器中打开它的风景像预期。任何想法吗?

My report properties are set to Width 11in and Height 8.5in. My body properties are set to Width 10in and Height 7.5in and the margins are 0, but the report always displays in portrait mode. The person who coded the page is using a reportviewer control inside of an aspx page which is being popped up from a JavaScript pop window writing the response to a pdf. If the report is opened in the report viewer it is landscape like expected. Any ideas anyone?

推荐答案

​​宽度,高度和方向:

width, height and orientation of a Report (.rdlc) depends on the two factors :

  1. 被应用在报表什么的页面设置。我们可以通过开题报告在Solution Explorer

  1. What page settings are applied on the report. We can set orientation to landscape by opening report in Solution Explorer

添加的$一些线c $ CS定义的宽度,高度和方向。

Adding Some line of codes to define width, height and orientation.


Function SetPageSettings()
    Dim PgSet As New System.Drawing.Printing.PageSettings
    Dim Psiz As New Printing.PaperSize
    Psiz.RawKind = Printing.PaperKind.A4
    PgSet.PaperSize = Psiz
    PgSet.Landscape = False
    PgSet.Margins.Top = 60
    PgSet.Margins.Bottom = 60
    PgSet.Margins.Right = 60
    PgSet.Margins.Left = 60
    ReportViewer1.SetPageSettings(PgSet)
End Function

这篇关于在风景模式下输出.rdlc为PDF报告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆