1
Reply

Confusion on reports

Christian Nwamba

Christian Nwamba

Aug 26 2013 5:17 AM
1.1k
Hi colleagues, I have a report that i needed to filter while putting it on a form with a report viewer. Am getting my data from an xsd dataset with a query and a "WHERE" parameter and i named the method FillByYear and GetByYear.

On the form i created a textbox and a button and in the click event of the button I have this code:

AuthorsTableAdapter.FillByLastName(BooksDataSet.Authors, textBox1.Text);
            this.reportViewer1.RefreshReport();


It worked perfectly fine, but when i tried to use a view instead of a table, it gave this error:

The best overloaded method match for 'Draft.UNKNOWN_MDFDataSet1TableAdapters.View2TableAdapter.FillByYEAR(DraftUNKNOWN_MDFDataSet1.View2DataTable, decimal?)' has some invalid arguments

Draft is the name of the project
Unknown_mdf is the name of the database
DataSet1 is the name of the dataset
View2 is the name of the View

Thanks in advance


Answers (1)