Click here to Skip to main content
15,896,154 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi - I've a simple report form that has a few buttons for different reports. When a button is clicked i'm doing this:
C#
private void btnStatutoryDirectorsListing_Click(object sender, EventArgs e)
{
   frmStatutoryDirectorsListing frmStatutoryDirectorsListing = new frmStatutoryDirectorsListing() { StartPosition = FormStartPosition.CenterScreen };
   frmStatutoryDirectorsListing.Show();
}


within the load event of frmStatutoryDirectorsListing i'm doing the following to display my report:
C#
private void frmStatutoryDirectorsListing_Load(object sender, EventArgs e)
{
   StatutoryDirectorsListing rptStatutoryDirectorsListing = new StatutoryDirectorsListing();
   crystalReportViewer1.ReportSource = rptStatutoryDirectorsListing;
}


The datasource for this report is 2 entities from my EDM, at the minute I just want to display a couple of fields from each entity but when I run the application and click the button to display the report, I am being asked for a Database login? Can I set my project up so that the report is automically logged onto the DB?
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900