I have a Reportviewer and i want to set my report programatically in the code-behind, as i have 1 report viewer and more reports.
When in design mode i can select a report, but how can i do that in C# code behind?
Thanks.
Peter
1 Answer, 1 is accepted
0
Steve
Telerik team
answered on 07 Mar 2009, 08:55 AM
Hello paul de Blaauw,
If you want to show the report in the report viewer on initial load, you can use the Page_Load eventhandler:
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
ReportViewer1.Report = new Report4();
}
}