Dim qryHDRS As String = "SELECT * FROM StatementHeaders where shid=" & shid
Dim qryLINES As String = "SELECT * FROM StatementLines where slshid=" & shid
Dim cmdHDR As New SqlCommand(qryHDRS)
Dim cmdLINES As New SqlCommand(qryLINES)
Dim daHDRS As New SqlDataAdapter(qryHDRS, cnn1)
Dim daLINES As New SqlDataAdapter(qryLINES, cnn1)
Dim myds As New GZStatementsDataSet
Dim CrystalReport1 As New rptCustomerStatement
DBOpen()
cmdHDR.Connection = cnn1
cmdLINES.Connection = cnn1
daHDRS = New SqlDataAdapter(qryHDRS, cnn1)
daLINES = New SqlDataAdapter(qryLINES, cnn1)
daHDRS.Fill(myds, "StatementHeaders")
daLINES.Fill(myds, "StatementLines")
CrystalReport1.SetDataSource(myds)
'CrystalReportViewer1.ReportSource = CrystalReport1
If pdf = False Then
CrystalReport1.PrintOptions.PrinterName = PrintDialog1.PrinterSettings.PrinterName
CrystalReport1.PrintToPrinter(1, True, 1, 0)
CrystalReport1.ExportToDisk(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat, fname)
Else
CrystalReport1.ExportToDisk(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat, fname)
'CrystalReportViewer1.ReportSource = CrystalReport1
End If
DBClose()
Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.
When asked, what has been your best career decision?
Deciding to stick with EE.
Being involved with EE helped me to grow personally and professionally.
Connect with Certified Experts to gain insight and support on specific technology challenges including:
We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE