Hi...
I am having problem with my Crystal Report XI Connection and Logon Code. I am using VB.NET 2003
1. I made a non-embedded report document named AccountReport.rpt and save it in "D:\Report\AccountReport.rpt"
2. AccountReport.rpt connection properties
a. I used an odbc(RDO) connection string
Provider=MSDataShape;Driver={Microsoft Access Driver (*.mdb)};Dbq=D:\Account.mdb;Uid=admin;Pwd=userxxx;
3. In My VB.NET code:
a. VB.NET Code:
Dim AccountRPT As New ReportDocument
'Instantiate my report document
AccountRPT.Load(Path.GetFullPath(".") & "D:\Report\AccountReport.rpt")
'Load the report
AccountRPT.DataSourceConnections(0).SetConnection("Account", "F:\Business\Grocerry\Account.mdb", "admin", "userxxx")
'You can see here that I change my database location from "D:\Account.mdb" to "F:\Business\Grocerry\Account.mdb".
AccountRPT.SetParameterValue("BALANCE", 2000)
'Passed a value into a parameter list
frmGraph.crvReport.ReportSource = AccountRPT
'Set my report document as a report source for viewing
4. The Problem.
a. The connection of my Report Document "AccountRPT" does not change from "D:\Account.mdb" to "F:\Business\Grocerry\Account.mdb".
If anybody can help please do...
Sincerely...Check with this link :
http://support.businessobjects.com/library/kbase/articles/c2010371.asp
It may help you to solve your problem.
Thanks,
Vidu.
No comments:
Post a Comment