locked
Report Viewer and Report.rdlc RRS feed

  • Question

  • User588997850 posted

    Hi,

    I am using Report Viewer for reports. I have designed the report and executed, it is executing perfectly but the desing at runtime is not following my desing.

    Following is my Code:

    Dim DS As New dsApprovals
    DS.Clear()
    Using db As New Data.Members
    DS.Tables("TableApprove").Merge(db.ApprovalReport(ddlMembers.SelectedItem.Value))
    End Using

    If (DS.Tables("TableApprove").Rows.Count > 0) Then
    MReportViewer.ProcessingMode = ProcessingMode.Local
    MReportViewer.LocalReport.ReportPath = Server.MapPath("~/Reports/ApprovalReport.rdlc")

    Dim datasource As New ReportDataSource("dsApproval", DS.Tables("TableApprove"))
    MReportViewer.LocalReport.DataSources.Clear()
    MReportViewer.LocalReport.DataSources.Add(datasource)

    Dim pg As New System.Drawing.Printing.PageSettings()
    pg.Margins.Top = 0
    pg.Margins.Bottom = 0
    pg.Margins.Left = 0
    pg.Margins.Right = 0
    Dim size As System.Drawing.Printing.PaperSize = New PaperSize()
    size.RawKind = CInt(PaperKind.A4)
    pg.PaperSize = size
    MReportViewer.SetPageSettings(pg)

    MReportViewer.LocalReport.Refresh()
    Else

    End If

    Please help me.

    Wednesday, April 2, 2014 5:56 AM

Answers