I have a Payroll project with a multiple forms that some of the forms requires printing. This code is present for every form that required printing. Please help me to convert my code to a function procedure so that i will just pass the datatable and the crystal report to the function.
I am using Visual Studio 2010 and my Crystal Report version is 13.
I am using Visual Studio 2010 and my Crystal Report version is 13.
HTML Code:
Dim DatatableReport As New DataTable
Dim crystalReport As New crPaySlip
Dim frm As New FrmReport
DatatableReport = DTReport
crystalReport.SetDataSource(DatatableReport)
frm.crViewer.ReportSource = crystalReport
frm.crViewer.Refresh()
frm.Show()