Page 1 of 1

Call The web Designer in the Page_Load

Posted: Mon Mar 30, 2009 5:09 am
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 ?

Call The web Designer in the Page_Load

Posted: Mon Mar 30, 2009 8:58 am
by raj07
protected void Button1_Click(object sender, EventArgs e)
{
stireport1.Load("Trial.mrt")

StiWebViewer1.Report = stireport1
}


i think u should try for this

Call The web Designer in the Page_Load

Posted: Mon Mar 30, 2009 9:24 am
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.

Call The web Designer in the Page_Load

Posted: Tue Mar 31, 2009 2:30 am
by Xavier C
thx you Edward it worked perfectly