Dim Report As New CrystalReport1
Private Sub Form_Load()
' Declare a ConnectionProperty object.
Dim CPProperty As CRAXDRT.ConnectionProperty
' Declare a DatabaseTable object.
Dim DBTable As CRAXDRT.DatabaseTable
' Get the first table in the report.
Set DBTable = Report.Database.Tables(1)
' Set the new location of the database.
DBTable.Location = "G:\Documents and Settings\Vahid_Nasiri\My Documents\db1.mdb"
' Get the "Database Password" property from the
' ConnectionProperties collection.
Set CPProperty = DBTable.ConnectionProperties("Database Password")
' Set the database password.
CPProperty.Value = "x"
Screen.MousePointer = vbHourglass
CRViewer91.ReportSource = Report
CRViewer91.ViewReport
Screen.MousePointer = vbDefault
End Sub
Private Sub Form_Resize()
CRViewer91.Top = 0
CRViewer91.Left = 0
CRViewer91.Height = ScaleHeight
CRViewer91.Width = ScaleWidth
End Sub
از طرف : وحید نصیری