I've created the application page with panel. Button_click handler adds ReportViewerWebPart to panel's controls. When I clicked "Actions" I've got this message: "An error has occurred with the data fetch. Please refresh the page and
retry".
Button_Click code:
void createChartButton_Click(object sender, EventArgs e)
{
ReportViewerWebPart rwp = new ReportViewerWebPart();
rwp.Height = "1000";
rwp.Title = "";
rwp.ToolBarMode = ToolBarDisplayMode.Full;
rwp.ToolBarItemsDisplayMode = ToolBarItem.Export | ToolBarItem.Print | ToolBarItem.Zoom;
rwp.AutoGenerateTitle = false;
rwp.AutoGenerateDetailLink = false;
rwp.KeepSessionAlive = false;
rwp.ScrollBars = ScrollBars.Vertical;
rwp.AsyncRendering = false;
rwp.ReportPath = "Shared Documents/Categories.rdl";
ReportParameterDefaultCollection parameters = rwp.OverrideParameters;
parameters.Add(new ReportParameter("StartDate", StartDate.SelectedDate.ToString()));
parameters.Add(new ReportParameter("EndDate", EndDate.SelectedDate.ToString()));
Content.Controls.Add(rwp);
}How can I resolve this problem?
Thanks.