コード例 #1
0
        public byte[] Render(ReportFormatInfo formatInfo)
        {
            Microsoft.Reporting.WebForms.Warning[] warnings;
            string[] streamids;
            string   mimeType;
            string   encoding;
            string   extension;

            byte[] result = this.m_Viewer.LocalReport.Render(formatInfo.FormatName, formatInfo.DeviceInfo, out mimeType, out encoding, out extension, out streamids, out warnings);
            return(result);
        }
コード例 #2
0
        public static byte[] RenderReport(string report, ReportFormatInfo formatInfo, ReportDataCallback_t cbGetReportDetails)
        {
            byte[] baReport = null;

            using (ReportViewer viewer = new ReportViewer())
            {
                // viewer.ReportPath = System.Web.Hosting.HostingEnvironment.MapPath("~/" + report);
                viewer.LoadEmbeddedReportDefinition(report);

                System.Xml.XmlDocument rep = ReportRepository.GetReport(report);

                if (cbGetReportDetails != null)
                    cbGetReportDetails(viewer, rep);

                rep = null;

                baReport = viewer.Render(formatInfo);
            } // End Using MyReportViewer

            return baReport;
        }
コード例 #3
0
        public static byte[] RenderReport(string report, ReportFormatInfo formatInfo, ReportDataCallback_t cbGetReportDetails)
        {
            byte[] baReport = null;

            using (ReportViewer viewer = new ReportViewer())
            {
                // viewer.ReportPath = System.Web.Hosting.HostingEnvironment.MapPath("~/" + report);
                viewer.LoadEmbeddedReportDefinition(report);

                System.Xml.XmlDocument rep = ReportRepository.GetReport(report);

                if (cbGetReportDetails != null)
                {
                    cbGetReportDetails(viewer, rep);
                }

                rep = null;

                baReport = viewer.Render(formatInfo);
            } // End Using MyReportViewer

            return(baReport);
        } // End Function RenderReport
コード例 #4
0
        public byte[] Render(ReportFormatInfo formatInfo)
        {
            Microsoft.Reporting.WebForms.Warning[] warnings;
            string[] streamids;
            string mimeType;
            string encoding;
            string extension;

            byte[] result = this.m_Viewer.LocalReport.Render(formatInfo.FormatName, formatInfo.DeviceInfo, out mimeType, out encoding, out extension, out streamids, out warnings);
            return result;
        }