Dynamically adding the StiReportViewer to page?

Stimulsoft Reports.WEB discussion
Post Reply
chaves
Posts: 1
Joined: Fri Sep 17, 2010 5:28 pm

Dynamically adding the StiReportViewer to page?

Post by chaves »

Hi,

Can StiReportViewer be added dynamically to the web page controls collection?
If yes, what is the correct way to do it?
When I try to add it dynamically to the page I noticed that the toolbar icons are not showing.

Thank you.
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

Dynamically adding the StiReportViewer to page?

Post by Vladimir »

Hello,

We tested the dynamic StiWebViewer control creation and found no errors. We used the following code:

Code: Select all

protected override void OnInit(EventArgs e)
{
    base.OnInit(e);

    StiWebViewer WebViewer1 = new StiWebViewer();
    WebViewer1.ID = "WebViewer1";
    Page.Form.Controls.Add(WebViewer1);
}
Thank you.
Post Reply