Page 1 of 1

download multiple report in one

Posted: Tue Aug 09, 2016 6:39 pm
by ns4098
hi
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);
                    
                    }
                 
                }
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.

Re: download multiple report in one

Posted: Wed Aug 10, 2016 7:46 am
by HighAley
Hello.

Please, send us your report template with sample data to support@stimulsoft.com.
Add screenshots of what you get in Viewer and describe what you need to get and we will prepare a solution for you.

Thank you.