Hi
I'm developing a project and in the project, I used crystal report. Firstly
my database isn't protected with password. After finishing project I
determined a password for my database.
Firstly I opened my database as private usage. I determined a database
password. Only password, there iso no login ID or user ID.
After that, I edited my crystal report.In the crystal report I changed only
jet database password. In the report parameter form(windows form) I added
codes shown below ;
crMyReport cr = new crMyReport();
TableLogOnInfo logOnInfo = new TableLogOnInfo ();
CrystalDecisions.Shared.TableLogOnInfo tliCurrent;
int i = 0;
foreach (CrystalDecisions.CrystalReports.Engine.Table tbCurrent in
cr.Database.Tables)
{
tliCurrent = tbCurrent.LogOnInfo;
tliCurrent.ConnectionInfo.UserID =string.Empty;
tliCurrent.ConnectionInfo.Password = string.Empty;
tliCurrent.ConnectionInfo.DatabaseName = "C:\\DB\\SERVER_DB.mdb";
tbCurrent.ApplyLogOnInfo(logOnInfo);
}
cr.SetParameterValue("PARAM1",3);
cr.SetParameterValue("PARAM2",5);
crViewer.ReportSource = cr;
But a form is shown as database login. The form wants to me table name(it is
written automatically,I can't change this value), server, database
name,userID and password.
I tried with some values but I couldn't run my report. I didn't determine
any user ID and password. I'm not sure server and database name values. What
are they? How can I run my report with these parameter?
I'm using ole db 4.0 database.
Thanks.