Open Crystal Report using Visual Basic
Hi,
How can I open the crystal report using visual basic ?
I have the direct path of the database. I am using Crystal Report ocx. I wish to specify the direct path of the database for previewing the report rather than using ODBC. Currently, this is how I do it:
PrintIt.ReportFileName = App.Path & "\REPORTS\Report.RPT"
PrintIt.WindowTitle = "Daily Report"
PrintIt.RetrieveDataFiles
PrintIt.DataFiles(0) = "c:\DB.mdb"
PrintIt.Action = 1
It seem to work alright but when I set a password to the database, the code above don't work. I have the password with me but how can I specify the password in the path?
I am using Crystal Report 4.5, Visual Basic 6, Access97.
Thanks in advance.