I am using the Report Viewer, loading a report using a bar chart. I cannot seem to load the dataset (20 rows of data), into 20 seperate pages. The code seems to work, says 20 pages, but the report viewer does not show 1 out of 20 in it's toolbar.
I have read about pagination and setting pagebreaks, but I am not sure if I have done that correctly.
I read about PagedDataSource and used that, it almost worked, but I still only get 1 out of 1 pages.
the code below
protected void Page_Load(object sender, EventArgs e)
{
ReportViewer1.ProcessingMode = ProcessingMode.Local;
ReportViewer1.LocalReport.ReportPath = @"C:\Documents and Settings\c-jbaker\My Documents\Visual Studio 2005\Projects\Web_Test1\Web_Test1\Report1.rdlc";
ReportViewer1.Height = Unit.Parse("490px");
ReportViewer1.Width = Unit.Parse("100%");
DataTable dt = GetData();
//Hashtable ht = GetData3();
PagedDataSource pds = new PagedDataSource();
pds.AllowPaging = true;
pds.PageSize = 1;
pds.DataSource = dt.DefaultView;
pds.CurrentPageIndex = 0;
//ReportDataSource ds = new ReportDataSource("StingrayDataSet_StudentInfo", dt);
ReportDataSource ds = new ReportDataSource("StingrayDataSet_StudentInfo", pds);
//ReportViewer1.LocalReport.DataSources.Add(ds);
//
ReportViewer1.DataBind();
ReportViewer1.LocalReport.Refresh();
}