Hello all,
I'm having a problem with Crystal reports to produce reports from an Access 2000 table.
I have created the report within vs as follows.
Add new item -> utilities - > crystal report
Then I select my database using OLEDB(ADO) byselecting Jet.4.0
When I get to the connection dialog, I had to provide the password in "Jet Database Password" section. CR does not seems to take the password when I typed in to password box.
Is there a difference between these two fields (Password and Jet database password) ???
Once I completed the connection wizard, I managed to create a report (based on one table) and saved the report in c:\ as MyTestReport.rpt
Then I created a project with a form to view the report as follows
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared
Form_Load()
Dim crtableLogoninfos As New TableLogOnInfos
Dim crtableLogoninfo As New TableLogOnInfo
Dim crConnectionInfo As New ConnectionInfo
Dim CrTables As Tables
Dim CrTable As Table
Dim TableCounter
Dim crReportDocument As New ReportDocument
crReportDocument.Load("c:\MyTestReport.rpt")
With crConnectionInfo
.ServerName = "c:\MYTestDB.MDB"
'.DatabaseName = "c:\MYTestDB.MDB"
.UserID = "Admin"
.Password = "test"
End With
'
CrTables = crReportDocument.Database.Tables
For Each CrTable In CrTables
crtableLogoninfo = CrTable.LogOnInfo
crtableLogoninfo.ConnectionInfo = crConnectionInfo
CrTable.ApplyLogOnInfo(crtableLogoninfo)
Next
me.CrystalReportViewer1.ReportSource = crReportDocument
END SUB
The problem is that every time I run the form, CR prompts for database login. At that point I can not loging to the database with my logging info (ie. actual password of the database is 'test'). It keeps asking to enter login info.
Can anyone please let me know the correct way to call Crystal report in VB.NET?
Also, I have noticed that in the database logging dialog which appears at runtime when I run the form, ask for a Server name as well as Database - What should I use with Access 2000?
Please help - any help on this will greatly appreciated.
I'm having a problem with Crystal reports to produce reports from an Access 2000 table.
I have created the report within vs as follows.
Add new item -> utilities - > crystal report
Then I select my database using OLEDB(ADO) byselecting Jet.4.0
When I get to the connection dialog, I had to provide the password in "Jet Database Password" section. CR does not seems to take the password when I typed in to password box.
Is there a difference between these two fields (Password and Jet database password) ???
Once I completed the connection wizard, I managed to create a report (based on one table) and saved the report in c:\ as MyTestReport.rpt
Then I created a project with a form to view the report as follows
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared
Form_Load()
Dim crtableLogoninfos As New TableLogOnInfos
Dim crtableLogoninfo As New TableLogOnInfo
Dim crConnectionInfo As New ConnectionInfo
Dim CrTables As Tables
Dim CrTable As Table
Dim TableCounter
Dim crReportDocument As New ReportDocument
crReportDocument.Load("c:\MyTestReport.rpt")
With crConnectionInfo
.ServerName = "c:\MYTestDB.MDB"
'.DatabaseName = "c:\MYTestDB.MDB"
.UserID = "Admin"
.Password = "test"
End With
'
CrTables = crReportDocument.Database.Tables
For Each CrTable In CrTables
crtableLogoninfo = CrTable.LogOnInfo
crtableLogoninfo.ConnectionInfo = crConnectionInfo
CrTable.ApplyLogOnInfo(crtableLogoninfo)
Next
me.CrystalReportViewer1.ReportSource = crReportDocument
END SUB
The problem is that every time I run the form, CR prompts for database login. At that point I can not loging to the database with my logging info (ie. actual password of the database is 'test'). It keeps asking to enter login info.
Can anyone please let me know the correct way to call Crystal report in VB.NET?
Also, I have noticed that in the database logging dialog which appears at runtime when I run the form, ask for a Server name as well as Database - What should I use with Access 2000?
Please help - any help on this will greatly appreciated.