Hello members,
am having a problem with my crystalreports failing to logon on to my access database. I have removed the password of the database but crystal reports is still failing to log onto my database
//below is the code am using to load my crystal report
SerialPrintreport cr = new SerialPrintreport();
TextObject T1 = (TextObject)cr.ReportDefinition.Sections["Section1"].ReportObjects["Text1"];
T1.Text = sn1.Text;
TextObject T2 = (TextObject)cr.ReportDefinition.Sections["Section1"].ReportObjects["Text2"];
T2.Text = sn2.Text;
string databasePath = Application.StartupPath + "\\serialprint.accdb";
cr.DataSourceConnections[0].SetConnection("MS Access Database", databasePath, "admin", "");
ParameterFieldDefinitions crParameterFieldDefinitions;
ParameterFieldDefinition crParameterFieldDefinition;
ParameterValues crParameterValues = new ParameterValues();
ParameterDiscreteValue crParameterDiscreteValue = new ParameterDiscreteValue();
crParameterDiscreteValue.Value = "1";
crParameterFieldDefinitions = cr.DataDefinition.ParameterFields;
crParameterFieldDefinition = crParameterFieldDefinitions["imageno"];
crParameterValues = crParameterFieldDefinition.CurrentValues;
crParameterValues.Clear();
crParameterValues.Add(crParameterDiscreteValue);
crParameterFieldDefinition.ApplyCurrentValues(crParameterValues);
SerialPrintreport.ReportSource = cr;
//
crystalreports requests for a password and fails to log onto access database