when report is loaded then it asks for the user name and password it's very shocking for me cos i haven't used any user name or password while at the time of creating Database in MS ACCESS. and i don't know which password and username is required for the report weither it's database username and passwrod or any thing else ..... i have used following code to
DetailRpt rpt = new DetailRpt();
rpt.Refresh();
crystalReportViewer1.ReportSource = rpt;
crystalReportViewer1.SelectionFormula = "{Archival_Scanning.Assign_To}='" + txtName.Text + "'";
Loading
Mohammed SobhiPosted Aug 31, 2009, 4:45 AM
ReportDocument rptdocReport = new ReportDocument();
rptdocReport.SetDatabaseLogon("", "", Database Path ,Database Name, true);
foreach (CrystalDecisions.CrystalReports.Engine.Table myTable in rptdocReport.Database.Tables)
{
TableLogOnInfo logInfo = myTable.LogOnInfo;
logInfo.ConnectionInfo.ServerName = Database Path;
logInfo.ConnectionInfo.DatabaseName = Database Name;
logInfo.ConnectionInfo.UserID = "";
logInfo.ConnectionInfo.Password = "";
myTable.ApplyLogOnInfo(logInfo);
}