i need to download and save multiple report in my report.
here is my code
Code: Select all
DataTable dtallexe = Bussiness.Executer.FindAllExecuterByCityID(ctyid);
foreach (DataRow row in dtallexe.Rows)
{
DataTable dt = new DataTable();
dt = Bussiness.Executer.FindAllDosseirByExeID(dt.Rows[0]["Prs_Family"].ToString());
if (dt.Rows.Count > 0)
{
System.Data.DataSet ds = new DataSet("Connection");
dt.TableName = "ds";
ds.Tables.Add(dt);
string path = Server.MapPath("~");
path = path + "Reports//Dos.mrt";
StiReport report = new StiReport();
report.Load(path);
report.Dictionary.Clear();
report.RegData(ds);
report.Dictionary.Synchronize();
StiWebViewer1.Report = report;
report.Render(false);
string exename = dt.Rows[0]["Prs_Family"].ToString() + "_" + dt.Rows[0]["Prs_Name"].ToString();
report.ReportName = exename;
Stimulsoft.Report.Web.StiReportResponse.ResponseAsExcel2007(this, report);
}
}
Stimulsoft.Report.Web.StiReportResponse.ResponseAsExcel2007(this, report); no more thing will happen.
is it anyway to download all report automaticlly?
thanks for your response.