Sunday, February 19, 2012

Database Logon problem Crystal Report

I am using following code in form load.
it works fine on one PC but when i run the same application on other pc with different version of Windows Xp it is asking for database logon for report.

I did tried using my provided login info using code but it is executing front end query as well as query in the report.

Any Suggestions will be appreciated.
Thanks in advance



ConnStr = "PROVIDER=MSDAORA.1;PERSIST SECURITY INFO=FALSE;USER ID=scott;PASSWORD=tiger;DATA SOURCE=orcl"
conObj = New OleDbConnection(ConnStr)

strsql = "select * from emp"

cmdObj.Connection = conObj

cmdObj.CommandText = strsql

daObj.SelectCommand = cmdObj

daObj.Fill(dsObj, "test")

rptDoc.Load("\\server\reports\abc.rpt")

srcCr = rptDoc

srcCr.SetDataSource(dsObj)

CRV.ReportSource = rptDoc

CRV.Show()i used CR viewer of CR XI ,it solved the problem. other system had cr viewer 9.5

No comments:

Post a Comment