This is a migrated thread and some comments may be shown as answers.

Reportviewer choose report

1 Answer 87 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
paul de Blaauw
Top achievements
Rank 1
paul de Blaauw asked on 06 Mar 2009, 11:57 AM
Hello,

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

Sort by
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();
        }
    }


All the best,
Steve
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
General Discussions
Asked by
paul de Blaauw
Top achievements
Rank 1
Answers by
Steve
Telerik team
Share this question
or