Exemplo n.º 1
0
 public bool Render(OnDemandReportRendering.Report report, NameValueCollection reportServerParameters, NameValueCollection deviceInfo, NameValueCollection clientCapabilities, ref Hashtable renderProperties, CreateAndRegisterStream createAndRegisterStream)
 {
     try
     {
         this.ParseParameters(deviceInfo);
         Stream outputStream = createAndRegisterStream(report.Name, "rpl", null, "application/octet-stream", false, StreamOper.CreateAndRegister);
         SPBProcessing.SPBProcessing sPBProcessing = null;
         using (sPBProcessing = new SPBProcessing.SPBProcessing(report, createAndRegisterStream, true, this.m_rplVersion, ref renderProperties))
         {
             sPBProcessing.SetContext(this.m_spbContext);
             sPBProcessing.GetNextPage(outputStream);
             sPBProcessing.UpdateRenderProperties(ref renderProperties);
         }
         return(false);
     }
     catch (ReportRenderingException)
     {
         throw;
     }
     catch (Exception ex2)
     {
         if (AsynchronousExceptionDetection.IsStoppingException(ex2))
         {
             throw;
         }
         throw new ReportRenderingException(ex2, true);
     }
 }
        public bool Render(AspNetCore.ReportingServices.OnDemandReportRendering.Report report, NameValueCollection reportServerParameters, NameValueCollection deviceInfo, NameValueCollection clientCapabilities, ref Hashtable someProps, CreateAndRegisterStream createAndRegisterStream)
        {
            double pageHeight = 1.7976931348623157E+308;

            using (SPBProcessing.SPBProcessing sPBProcessing = new SPBProcessing.SPBProcessing(report, createAndRegisterStream, pageHeight))
            {
                DeviceInfo deviceInfo2 = new DeviceInfo(deviceInfo);
                SPBContext sPBContext  = new SPBContext();
                sPBContext.StartPage                = 0;
                sPBContext.EndPage                  = 0;
                sPBContext.MeasureItems             = false;
                sPBContext.AddSecondaryStreamNames  = true;
                sPBContext.AddToggledItems          = deviceInfo2.ExpandToggles;
                sPBContext.AddFirstPageHeaderFooter = true;
                sPBProcessing.SetContext(sPBContext);
                using (IWordWriter writer = this.NewWordWriter())
                {
                    WordRenderer wordRenderer = this.NewWordRenderer(createAndRegisterStream, deviceInfo2, sPBProcessing, writer, report.Name);
                    try
                    {
                        return(wordRenderer.Render());
                    }
                    catch (ReportRenderingException)
                    {
                        throw;
                    }
                    catch (Exception ex2)
                    {
                        if (AsynchronousExceptionDetection.IsStoppingException(ex2))
                        {
                            throw;
                        }
                        throw new ReportRenderingException(ex2, true);
                    }
                }
            }
        }