| | | Forum Guru
       
Group: Forum Members Last Login: 7/17/2005 3:08:00 PM Posts: 120, Visits: 1 |
| Hello, I m using Crystal Report 9 Viewer Control in Vb 6.0 How to change the path of Database ?? I have used Cr9 control through Designer in which i have select the option of "From an existing report" to select a report. Ihave used the following code to show the report Dim Report As New CrAccList Private Sub Form_Load() 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
I have made Setup of this project. Its working well on my pc. but when i installed it on other pc. its not working due to the path of Database. Please help me in changing the Database Path. Thanks in advance. Farooq |
| | | | Forum Newbie
       
Group: Forum Members Last Login: 12/25/2005 11:03:52 PM Posts: 8, Visits: 12 |
| Dear Hafiz, I dont think a title like 'Pls help me' is going to help you much. If you can hint at your problem in the title, the chances of getting help will be higher. |
| | | | Forum Newbie
       
Group: Forum Members Last Login: 6/12/2005 5:28:00 AM Posts: 1, Visits: 1 |
| you need to supply logon credentials to the report before opening it. If you have sub-reports, then you also need to supply logon info to all of them. You can do something like this..... Report.Database.Tables(1).SetLogOnInfo "DSN name" , "Database name", "UserID", "Password" all the parameters may not be required, depending on the database you are using. If you use CRAXDRT library, it's quite easy to loop through all subreports and their tables to set logon info. http://www.codesforall.com/cr/articles.htm has got some good info on automating crystal reports from VB. there are also some useful source codes here. check it out.
Peter |
| |
|
|