Dim sQuery As String Dim cryRpt As New ReportDocument Dim DA As SqlDataAdapter Dim ds As New DataSet 'JDLCommon.ModCommon.strConString (Data Source=192.168.1.100;Initial 'Catalog=JDLapps;User ID=sa;Password=sql2005).This is my connection string that 'defined in app.config Try SourceSQL="select Query" cryRpt = rptDoc cryRpt.SetDatabaseLogon("sa","sql2005") DA = New SqlDataAdapter(SourceSQL, JDLCommon.ModCommon.strConString) DA.Fill(ds, "tablename") cryRpt.SetDataSource(ds.Tables("tablename")) rptViewer.ReportSource = cryRpt 'rptDoc.VerifyDatabase() 'rptViewer.co JDLCommon.modReportCommon.InitializeReports(rptViewer) docName = documentname & rptname.Substring(3) rptViewer.Refresh()
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)