jesse_j3000
May 10th, 2006, 01:57 AM
Hi...
I am having problem with my crystal report XI connection. Im using VB.NET 2003.
The situation is this:
I created a Crystal Report Document with the Crystal Report Editor. I named it CRBalanace.rpt. It is a Non-Embedded report. So I only call it from inside my VB.NET code.
When I created the connection for CRBalance.rpt I used connection string but did not indicate any DSN. So its like DSNless connection.
The code goes like this:
dim CRDoc as New ReportDocument
CRDoc.Load("C:\RSBalance.rpt") 'Loaded the report
CRDoc.DataSourceConnections(0).SetConnection("Account","C:\DB\Account.mdb","user01","user01")
CRViewer.ReportSource = CRDoc
So Basically what happened was....
When I created CRBalance.rpt It was first pointed to "D:\Account.mdb" in the connection string. And I was trying to change its database connection thru my code..... "CRDoc.DataSourceConnections(0).SetConnection("Account","C:\DB\Account.mdb","user01","user01")"
I just followed the instructions written in MSDN and the Business Objects site..... But they all dont work..... Is there anything I missed... Please Help....
I am having problem with my crystal report XI connection. Im using VB.NET 2003.
The situation is this:
I created a Crystal Report Document with the Crystal Report Editor. I named it CRBalanace.rpt. It is a Non-Embedded report. So I only call it from inside my VB.NET code.
When I created the connection for CRBalance.rpt I used connection string but did not indicate any DSN. So its like DSNless connection.
The code goes like this:
dim CRDoc as New ReportDocument
CRDoc.Load("C:\RSBalance.rpt") 'Loaded the report
CRDoc.DataSourceConnections(0).SetConnection("Account","C:\DB\Account.mdb","user01","user01")
CRViewer.ReportSource = CRDoc
So Basically what happened was....
When I created CRBalance.rpt It was first pointed to "D:\Account.mdb" in the connection string. And I was trying to change its database connection thru my code..... "CRDoc.DataSourceConnections(0).SetConnection("Account","C:\DB\Account.mdb","user01","user01")"
I just followed the instructions written in MSDN and the Business Objects site..... But they all dont work..... Is there anything I missed... Please Help....