download multiple report in one
Posted: Tue Aug 09, 2016 6:39 pm
hi
i need to download and save multiple report in my report.
here is my code
the problem is after downloading the first file the foreach loop dosent continue any more.i mean after running
Stimulsoft.Report.Web.StiReportResponse.ResponseAsExcel2007(this, report); no more thing will happen.
is it anyway to download all report automaticlly?
thanks for your response.
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.