PROBLEM: I see login Info window when loading report.
Tried alot. Read many forums but no success. Below is the code. I am using latest Crystal Report in VS2010. Windows forms.
I am using access db 2010 with password only. I am not sure what to use username and I never mentioned in access. My CrystalReportViewer is attached to DataSet which is ReportingDS.xsd .
Please help.
private static string StrCon = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + Application.ExecutablePath.ToString().Substring(0, Application.ExecutablePath.ToString().LastIndexOf('\\')) + "\\Reporting.accdb;Jet OLEDB:Database Password=abc;";
public Report_Frm()
{
InitializeComponent();
}
private void Report_Frm_Load(object sender, EventArgs e)
{
ReportDocument cryRpt = new ReportDocument();
cryRpt.Load(@"C:\Users\chris\Documents\Visual Studio 2010\Projects\ReportingSystem\ReportingSystem\myReport.rpt");
cryRpt.SetDatabaseLogon("Admin", "abc", @"C:\Users\chris\Documents\Visual Studio 2010\Projects\ReportingSystem\ReportingSystem\ReportingDS", "Reporting.accdb");
crystalReportViewer.ReportSource = cryRpt;
//crystalReportViewer.Refresh();
}