1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
| Imports Microsoft.Reporting.WinForms
Imports System.IO
Public Class frmPrint
Private Sub frmPrint_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
Me.taVoucher.Fill(dsVoucher.dtblVoucher, frmStart.strStore, frmStart.dtDateStart, frmStart.dtDateEnd, frmStart.intTill)
Me.TaVoucherDetail.Fill(dsVoucher.dtblVoucherDetail, frmStart.strStore, frmStart.dtDateStart, frmStart.dtDateEnd, frmStart.intTill, frmStart.dgvVoucher.CurrentRow.Cells(0).Value.ToString)
rvVoucher.RefreshReport()
'Dim test As New SubreportProcessingEventHandler(AddressOf LocalReport_SubreportProcessing)
Dim subreport As IO.Stream = New FileStream("rptVoucherDetail.rdlc", FileMode.Open, FileAccess.Read)
rvVoucher.LocalReport.LoadSubreportDefinition("rptVoucherDetail", subreport)
'Me.rvVoucher.RefreshReport()
End Sub
Public Sub LocalReport_SubreportProcessing(ByVal sender As Object, ByVal e As SubreportProcessingEventArgs) Handles rvVoucher.localreport.subreportprocessing
Dim src As New ReportDataSource(dsVoucher.dtblVoucherDetail.TableName, bdsVoucherDetail)
e.DataSources.Add(src)
End Sub
End Class |
Partager