Farna Farna - 9 months ago 71
C# Question

Reporting of VS 2010 and my issues

I make a WinForms app and I use ReportViewer on my form and I design a report (

) for it. In my report I select my table and stored procedure and I define the parameter for my stored procedure, and in form load event of my form I write :

private void Form1_Load(object sender, EventArgs e)
// TODO: This line of code loads data into the 'testoDataSet.Table2' table. You can move, or remove it, as needed.

ReportParameter pa = new ReportParameter("Name", "abc");
ReportParameter pa1 = new ReportParameter("Family", "xyz");

reportViewer1.LocalReport.SetParameters(new ReportParameter[] { pa, pa1 });


but when I run my app all records showed on my report viewer but my select query is:

select *
from User
where Name = 'abc' and Family = 'xyz';

What is wrong??


it solved:

this.Table2TableAdapter.FillByNameAndFamily(this.testoDataSet.Table2, "abc", "xyz");