Call The web Designer in the Page_Load

Stimulsoft Reports.WEB discussion
Post Reply
Xavier C
Posts: 3
Joined: Mon Mar 30, 2009 4:46 am

Call The web Designer in the Page_Load

Post by Xavier C »

In Visual studio 2005 , im using this code:

Code: Select all

protected void  Button1_Click(object sender, EventArgs e)
        {
            StiReport report = new StiReport();
            report.Load(HttpContext.Current.Server.MapPath(string.Empty) + "\\Reports\\Nouveau.mrt");         
            StiWebDesigner1.Design(report);
        }
and It is working

but if i try to put this code in the Page_Load , it isn't working

Code: Select all

protected void Page_Load(object sender, EventArgs e)
        {
            StiReport report = new StiReport();
            report.Load(HttpContext.Current.Server.MapPath(string.Empty) + "\\Reports\\Nouveau.mrt");         
            StiWebDesigner1.Design(report);
        }
Is it possible to call the WebDesigner in the Page_Load method ? and if it's not why ? and is it going to be possible in a near future ?
raj07
Posts: 21
Joined: Fri Feb 13, 2009 1:16 am
Location: Mumbai

Call The web Designer in the Page_Load

Post by raj07 »

protected void Button1_Click(object sender, EventArgs e)
{
stireport1.Load("Trial.mrt")

StiWebViewer1.Report = stireport1
}


i think u should try for this
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Call The web Designer in the Page_Load

Post by Edward »

Hi.

Please try the following code:

protected void Page_Load(object sender, EventArgs e)
{
string keyValue = Page.Request.QueryString.Get("stimulsoft_webdesigner");
if (!IsPostBack && keyValue == null)
{
StiReport report = new StiReport();
report.Load(HttpContext.Current.Server.MapPath(string.Empty) + "\\Reports\\Nouveau.mrt");
StiWebDesigner1.Design(report);
}
}

Thank you.
Xavier C
Posts: 3
Joined: Mon Mar 30, 2009 4:46 am

Call The web Designer in the Page_Load

Post by Xavier C »

thx you Edward it worked perfectly
Post Reply