using System; using System.Collections.Generic; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data; using System.Data.SqlClient; using Stimulsoft.Report; using Stimulsoft.Report.Web; using Stimulsoft.Report.Dictionary; public partial class Designer : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (Page != null && !Page.IsPostBack) { StiReport report = new StiReport(); report.Load(Server.MapPath(@"report.mrt")); report.Dictionary.Databases.Clear(); report.Dictionary.DataSources.Clear(); report.Dictionary.Databases.Add(new Stimulsoft.Report.Dictionary.StiSqlDatabase("bp_DS_Internal", "")); var DS1 = new StiSqlSource("bp_DS_Internal", "a_CatItems", "a_CatItems", "SELECT * FROM [a_CatItems]", true); DS1.Columns.Add("Category", typeof(String)); DS1.Columns.Add("Item", typeof(String)); DS1.Columns.Add("Price", typeof(int)); report.Dictionary.DataSources.Add(DS1); var DS2 = new StiSqlSource("bp_DS_Internal", "a_dd", "a_dd", "SELECT * FROM [a_dd]", true); DS2.Columns.Add("Company", typeof(String)); DS2.Columns.Add("Type", typeof(String)); DS2.Columns.Add("Amount", typeof(int)); report.Dictionary.DataSources.Add(DS2); StiMobileDesigner1.Report = report; } } protected void StiMobileDesigner1_GetPreviewDataSet(object sender, Stimulsoft.Report.MobileDesign.StiMobileDesigner.StiPreviewReportEventArgs e) { ((StiSqlDatabase)e.Report.Dictionary.Databases["bp_DS_Internal"]).ConnectionString = "Data Source=.;Initial Catalog=db;Integrated Security=True"; } protected void StiMobileDesigner1_SaveReport(object sender, Stimulsoft.Report.MobileDesign.StiMobileDesigner.StiSaveReportEventArgs e) { StiReport report = e.Report; report.Save(Server.MapPath("report.mrt")); } }