Ejemplo n.º 1
0
    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    protected void btnEditReport_Click(object sender, EventArgs e)
    {
        try
        {
            if (lstReport.SelectedIndex < 0)
            {
                return;
            }                                             //ShowMsg("Please Select Report to edit it", "رجاء حدد تقرير للتعديل");

            string    RepID = lstReport.SelectedValue;
            DataTable RepDT = DBFun.FetchData(" SELECT * FROM Report WHERE RepID = '" + RepID + "'");
            if (!DBFun.IsNullOrEmpty(RepDT))
            {
                string repStr = RepDT.Rows[0]["RepTemp" + FormSession.Language].ToString();
                if (string.IsNullOrEmpty(repStr))
                {
                    return;
                }

                StiReport report = new StiReport();
                report.LoadFromString(repStr);
                report.Dictionary.Databases.Clear();
                report.Dictionary.Databases.Add(new StiSqlDatabase("Connection", General.ConnString));
                report.Dictionary.Synchronize();
                report.Compile();
                StiWebDesigner1.Design(report);
                ////this.InvokeRefreshPreview();
            }
        }
        catch (Exception ex) { }
    }
Ejemplo n.º 2
0
 protected void StiWebViewer1_ReportDesign(object sender, EventArgs e)
 {
     StiWebDesigner1.Design(GetReport());
 }