In the following code, when I click the button, it will show all the entries in the User table instead of giving me one that has (UserID == 17).
ReGdbEntities re = new ReGdbEntities();
private void buttonX1_Click(object sender, EventArgs e)
{
Report report = new Report();
string fileName = Application.StartupPath + @"\Reports\Untitled.frx";
var jfja = re.Users.Where(u => u.UserID == 17);
report.RegisterData(jfja.ToList(), "User");
report.GetDataSource("User").Enabled = true;
report.Load(fileName);
report.Prepare();
report.Preview = this.previewControl1;
report.Show();
}
source
share