0

Below is the code for the new page setting:

Dim newPageSettings As New PageSettings
newPageSettings.Margins = New Margins(20, 20, 20, 20)
newPageSettings.Landscape = True
Dim paperSize As PaperSize = New PaperSize()
paperSize.RawKind = PaperKind.A4
newPageSettings.PaperSize = paperSize
ReportViewer1.SetPageSettings(newPageSettings)
Me.ReportViewer1.RefreshReport()

After I debug the system and click Print Preview in ReportViewer, the screen display as below:enter image description here

I seriously don't know how this happen. Please help. Thanks.

Cœur
  • 37,241
  • 25
  • 195
  • 267
stillLearning
  • 84
  • 2
  • 12

1 Answers1

0

I have already found a solution for above issue. Instead of using coding to setup setting for print preview, I change the Report Setting in rdlc. Please see below picture for more info: Click the Report Properties

Change to the right setting

stillLearning
  • 84
  • 2
  • 12