Hi,
Previously, I've created some reports with Crystal Report 9. The data were taken from my MSAccess 2000 database. Then I added the report into my VB6 and then it converted my crystal report from .rpt to .dsr
I managed to view the report with the report viewer created by VB6 until later I added password to open my MSAccess database to prevent other people from opening the database directly from MSAccess.
I can view the .rpt report from Crystal Report 9 by verifying the database, and then key in the password but how to view the .dsr report from my report viewer?
Here are the codes for 1 of my report viewer:
Dim Report As New CrystalReport1
Dim CRXDatabaseField As CRAXDRT.DatabaseFieldDefinition
Private Sub cmdClose_Click()
AdminMenu.Enabled = True
Unload Me
End Sub
Private Sub cmdRefresh_Click()
CRViewer91.Refresh
End Sub
Private Sub Form_Load()
Screen.MousePointer = vbHourglass
Set CRXDatabaseField = Report.Database.Tables.Item(1).Fields.Item(1)
Report.RecordSortFields.Add CRXDatabaseField, crAscendingOrder
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
Is there any extra code to be added to bypass the database password?