在风景模式下输出.rdlc为PDF报告

在风景模式下输出.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