I need some help... I have displayed in a gridview some data from a sqldatasource that I have successfully grab that data that's displaying in the grid view into a dataset which I have confirmed writing it to a XML file and viewing the data. My problem is that I want to take that dataset and display it in reportviewer(NOT crystal reports) any way I can do this? I tried for many days but no success, I have even tried taking the XML file but reportviewer don't accept this type. Here's the code
protected void btnReport_Click(object sender, EventArgs e)
{
DataSourceSelectArguments args = new DataSourceSelectArguments();
DataView view = (DataView)SqlDataSource1.Select(args);
DataTable table = view.ToTable();
DataSet ds = new DataSet();
ds.Tables.Add(table);
ds.WriteXml("employeeData.xml");
}
No comments:
Post a Comment