Guys, i have created reports in crystal report 10 for my VB application. Now how sud i open the report from my application. Infact i have tried opening the report but i get the following error:
[HTML]Logon failed.
Details: ADO Error Code: 0x80040e4d
Source: Microsoft OLE DB Provider for SQL Server
Description: Login failed for user 'sa'
SQL State: 42000
Native Error: 18456[/HTML]
My code was:
[HTML]Dim Appl As New CRAXDRT.Applica tion
Dim Report As New CRAXDRT.Report
CrystalActiveXR eportViewer1.To p = 0
CrystalActiveXR eportViewer1.Le ft = 0
CrystalActiveXR eportViewer1.He ight = ScaleHeight
CrystalActiveXR eportViewer1.Wi dth = ScaleWidth
Set Report = Appl.OpenReport ("e:\report\rpt master.rpt")
CrystalActiveXR eportViewer1.Re portSource = Report
CrystalActiveXR eportViewer1.Vi ewReport[/HTML]
My database is located in a network server wher SQL server is installed n i have created an odbc datasource for the connection. I have used the same connection with the report an it works. I have added the username and password to access the database in the report. It connects well and can retrieve the data. But when i open the same report via Visual Basic i get the above errors.
What is the possible cause????? Plus i need 2 ask why i cannot find the Crystal Report Viewer Control 10 in the componenents list as suggested by some ppl. I get the Crystal ActiveX report viewer control instead.
[HTML]Logon failed.
Details: ADO Error Code: 0x80040e4d
Source: Microsoft OLE DB Provider for SQL Server
Description: Login failed for user 'sa'
SQL State: 42000
Native Error: 18456[/HTML]
My code was:
[HTML]Dim Appl As New CRAXDRT.Applica tion
Dim Report As New CRAXDRT.Report
CrystalActiveXR eportViewer1.To p = 0
CrystalActiveXR eportViewer1.Le ft = 0
CrystalActiveXR eportViewer1.He ight = ScaleHeight
CrystalActiveXR eportViewer1.Wi dth = ScaleWidth
Set Report = Appl.OpenReport ("e:\report\rpt master.rpt")
CrystalActiveXR eportViewer1.Re portSource = Report
CrystalActiveXR eportViewer1.Vi ewReport[/HTML]
My database is located in a network server wher SQL server is installed n i have created an odbc datasource for the connection. I have used the same connection with the report an it works. I have added the username and password to access the database in the report. It connects well and can retrieve the data. But when i open the same report via Visual Basic i get the above errors.
What is the possible cause????? Plus i need 2 ask why i cannot find the Crystal Report Viewer Control 10 in the componenents list as suggested by some ppl. I get the Crystal ActiveX report viewer control instead.
Comment