Skip to Content
Former Member
Jan 21, 2011 at 02:35 PM

CR Viewer in VB.NET 2010


For the life of me, I cannot get the viewer to logon to the database automatically instead of prompting me all the time.

It is a MS Access Database, ADO.

Thank you in advanced. 😊


Public Class ReportApp

Private rptDocument As New CrystalDecisions.CrystalReports.Engine.ReportDocument

Private Sub objTree_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles objTree.DoubleClick

If objTree.SelectedNode.Text = "Item List Template" Then

rptDocument.Load("C:\Users\Owner\documents\visual studio 2010\Projects\cmxReporting\cmxReporting\CrystalReport1.rpt")

With rptDocument.DataSourceConnections(0)

Dim strDBName As String = .DatabaseName

Dim blnIntegrated As Boolean = .IntegratedSecurity

.SetConnection("C:\ICOM\Database\CBODef_s.mdb", strDBName, blnIntegrated)

End With


End If

End Sub