public void SubReportCallback(ICatalogItemContext reportContext, string subreportPath, out ICatalogItemContext subreportContext, out string description, out ReportProcessing.GetReportChunk getCompiledDefinitionCallback, out ParameterInfoCollection parameters)
        {
            getCompiledDefinitionCallback = null;
            IChunkFactory chunkFactory = null;

            this.m_subreportCallback(reportContext, subreportPath, null, this.NeedsUpgrade, null, out subreportContext, out description, out chunkFactory, out parameters);
            if (chunkFactory != null)
            {
                if (ReportProcessing.ContainsFlag(chunkFactory.ReportProcessingFlags, ReportProcessingFlags.OnDemandEngine))
                {
                    subreportContext = null;
                    description      = null;
                    getCompiledDefinitionCallback = null;
                    parameters = null;
                    string text  = subreportPath.MarkAsPrivate();
                    string text2 = reportContext.ItemPathAsString.MarkAsPrivate();
                    Global.Tracer.Trace(TraceLevel.Warning, "The subreport '{0}' could not be processed.  Parent report '{1}' failed to automatically republish, or it contains a Reporting Services 2005-style CustomReportItem, and is therefore incompatible with the subreport. To correct this error, please attempt to republish the parent report manually. If it contains a CustomReportItem, please upgrade the report to the latest version.", text, text2);
                    if (this.m_errorContext != null)
                    {
                        this.m_errorContext.Register(ProcessingErrorCode.rsEngineMismatchParentReport, Severity.Warning, ObjectType.Subreport, text, null, text, text2);
                    }
                    throw new ReportProcessingException(ErrorCode.rsInvalidOperation, RPRes.rsEngineMismatchParentReport(ObjectType.Subreport.ToString(), subreportPath, null, subreportPath, reportContext.ItemPathAsString));
                }
                ChunkFactoryAdapter @object = new ChunkFactoryAdapter(chunkFactory);
                getCompiledDefinitionCallback = @object.GetReportChunk;
                return;
            }
            if (subreportContext != null)
            {
                return;
            }
            throw new ReportProcessingException(RPRes.rsMissingSubReport(subreportPath, subreportPath), ErrorCode.rsItemNotFound);
        }
        public void SubReportDataSourcesCallback(ICatalogItemContext reportContext, string subreportPath, out ICatalogItemContext subreportContext, out ReportProcessing.GetReportChunk getCompiledDefinitionCallback, out DataSourceInfoCollection dataSources)
        {
            getCompiledDefinitionCallback = null;
            IChunkFactory getCompiledDefinitionCallback2 = null;

            m_subreportDataSourcesCallback(reportContext, subreportPath, NeedsUpgrade, out subreportContext, out getCompiledDefinitionCallback2, out dataSources, out DataSetInfoCollection _);
            if (getCompiledDefinitionCallback2 != null)
            {
                if (ReportProcessing.ContainsFlag(getCompiledDefinitionCallback2.ReportProcessingFlags, ReportProcessingFlags.OnDemandEngine))
                {
                    subreportContext = null;
                    getCompiledDefinitionCallback = null;
                    dataSources = null;
                    string text  = subreportPath.MarkAsPrivate();
                    string text2 = reportContext.ItemPathAsString.MarkAsPrivate();
                    Global.Tracer.Trace(TraceLevel.Warning, "The subreport '{0}' could not be processed.  Parent report '{1}' failed to automatically republish, or it contains a Reporting Services 2005-style CustomReportItem, and is therefore incompatible with the subreport. To correct this error, please attempt to republish the parent report manually. If it contains a CustomReportItem, please upgrade the report to the latest version.", text, text2);
                    throw new ReportProcessingException(ErrorCode.rsInvalidOperation, RPRes.rsEngineMismatchParentReport(ObjectType.Subreport.ToString(), text, null, text, text2));
                }
                ChunkFactoryAdapter @object = new ChunkFactoryAdapter(getCompiledDefinitionCallback2);
                getCompiledDefinitionCallback = @object.GetReportChunk;
            }
            else if (subreportContext == null)
            {
                throw new ReportProcessingException(RPRes.rsMissingSubReport(subreportPath, subreportPath), ErrorCode.rsItemNotFound);
            }
        }
        public int PerformSort(string paginationMode, string sortId, SortOptions sortDirection, bool clearSort, out string uniqueName)
        {
            this.SetProcessingCulture();
            ControlSnapshot snapshot = this.m_executionSession.Snapshot;

            try
            {
                this.m_executionSession.Snapshot = new ControlSnapshot();
                snapshot.PrepareExecutionSnapshot(this.m_executionSession.Snapshot, null);
                using (ProcessingStreamHandler @object = new ProcessingStreamHandler())
                {
                    this.m_itemContext.RSRequestParameters.PaginationModeValue = paginationMode;
                    ReportProcessing  reportProcessing = this.CreateAndConfigureReportProcessing();
                    ProcessingContext pc = this.CreateProcessingContext(@object.StreamCallback);
                    AspNetCore.ReportingServices.ReportProcessing.RenderingContext rc = this.CreateRenderingContext();
                    int result = default(int);
                    OnDemandProcessingResult onDemandProcessingResult = reportProcessing.ProcessUserSortEvent(sortId, sortDirection, clearSort, pc, rc, (IChunkFactory)snapshot, out uniqueName, out result);
                    if (onDemandProcessingResult != null && onDemandProcessingResult.SnapshotChanged)
                    {
                        this.m_executionSession.SaveProcessingResult(onDemandProcessingResult);
                    }
                    else
                    {
                        this.m_executionSession.Snapshot = snapshot;
                    }
                    return(result);
                }
            }
            catch
            {
                this.m_executionSession.Snapshot = snapshot;
                throw;
            }
        }
 public override object this[string key]
 {
     get
     {
         if (key == null)
         {
             return(null);
         }
         m_reportOM.PerformPendingFieldValueUpdate();
         m_usedInExpression = true;
         if (ReportProcessing.CompareWithInvariantCulture(key, "Value", ignoreCase: true) == 0)
         {
             return(Value);
         }
         if (ReportProcessing.CompareWithInvariantCulture(key, "IsMissing", ignoreCase: true) == 0)
         {
             return(IsMissing);
         }
         if (ReportProcessing.CompareWithInvariantCulture(key, "LevelNumber", ignoreCase: true) == 0)
         {
             return(LevelNumber);
         }
         return(GetProperty(key));
     }
 }
        private DataSetPublishingResult GetCompiledDataSet(DataSetInfo dataSetInfo, ICatalogItemContext dataSetContext)
        {
            StoredDataSet storedDataSet = this.m_catalogTempDB.GetCompiledDataSet(dataSetInfo);

            if (storedDataSet != null && !storedDataSet.Definition.SequenceEqual(dataSetInfo.Definition))
            {
                storedDataSet = null;
            }
            if (storedDataSet == null)
            {
                DataSetPublishingResult result = default(DataSetPublishingResult);
                try
                {
                    using (ControlSnapshot createChunkFactory = new ControlSnapshot())
                    {
                        ReportProcessing  reportProcessing = this.CreateAndConfigureReportProcessing();
                        PublishingContext sharedDataSetPublishingContext = new PublishingContext(dataSetContext, dataSetInfo.Definition, createChunkFactory, AppDomain.CurrentDomain, true, this.GetDataSourceForSharedDataSetHandler, reportProcessing.Configuration);
                        result = reportProcessing.CreateSharedDataSet(sharedDataSetPublishingContext);
                    }
                }
                catch (Exception inner)
                {
                    throw new DefinitionInvalidException(dataSetInfo.AbsolutePath, inner);
                }
                storedDataSet = new StoredDataSet(dataSetInfo.Definition, result);
                this.m_catalogTempDB.SetCompiledDataSet(dataSetInfo, storedDataSet);
            }
            return(storedDataSet.PublishingResult);
        }
        protected override void ProcessReport(ProcessingErrorContext errorContext, ExecutionLogContext executionLogContext, ref UserProfileState userProfileState)
        {
            ChunkFactoryAdapter @object           = new ChunkFactoryAdapter(base.PublicProcessingContext.ChunkFactory);
            Hashtable           instanceObjects   = default(Hashtable);
            Hashtable           definitionObjects = default(Hashtable);

            IntermediateFormatReader.State declarationsRead = default(IntermediateFormatReader.State);
            bool flag = default(bool);

            base.m_reportSnapshot = ReportProcessing.DeserializeReportSnapshot((ReportProcessing.GetReportChunk)@object.GetReportChunk, (ReportProcessing.CreateReportChunk)@object.CreateReportChunk, base.PublicProcessingContext.GetResourceCallback, base.PublicRenderingContext, base.PublicProcessingContext.DataProtection, out instanceObjects, out definitionObjects, out declarationsRead, out flag);
            Global.Tracer.Assert(null != base.m_reportSnapshot, "(null != reportSnapshot)");
            Global.Tracer.Assert(null != base.m_reportSnapshot.Report, "(null != reportSnapshot.Report)");
            Global.Tracer.Assert(null != base.m_reportSnapshot.ReportInstance, "(null != reportSnapshot.ReportInstance)");
            base.m_chunkManager = new ChunkManager.RenderingChunkManager(@object.GetReportChunk, instanceObjects, definitionObjects, declarationsRead, base.m_reportSnapshot.Report.IntermediateFormatVersion);
            bool             flag2     = default(bool);
            EventInformation eventInfo = default(EventInformation);

            base.Processing.ProcessShowHideToggle(base.PublicRenderingContext.ShowHideToggle, base.m_reportSnapshot, base.PublicRenderingContext.EventInfo, base.m_chunkManager, out flag2, out eventInfo);
            if (flag2)
            {
                base.PublicRenderingContext.EventInfo = eventInfo;
            }
            bool retrieveRenderingInfo = this.IsRenderStream || !flag;

            base.m_renderingContext = new AspNetCore.ReportingServices.ReportRendering.RenderingContext(base.m_reportSnapshot, base.PublicRenderingContext.Format, base.m_reportSnapshot.ExecutionTime, base.m_reportSnapshot.Report.EmbeddedImages, base.m_reportSnapshot.Report.ImageStreamNames, base.PublicRenderingContext.EventInfo, base.PublicRenderingContext.ReportContext, base.PublicRenderingContext.ReportUri, base.RenderingParameters, @object.GetReportChunk, base.m_chunkManager, base.PublicProcessingContext.GetResourceCallback, @object.GetChunkMimeType, base.PublicRenderingContext.StoreServerParametersCallback, retrieveRenderingInfo, base.PublicRenderingContext.AllowUserProfileState, base.PublicRenderingContext.ReportRuntimeSetup, base.PublicProcessingContext.JobContext, base.PublicProcessingContext.DataProtection);
        }
 public byte[] RenderStream(string format, string deviceInfo, string streamID, out string mimeType)
 {
     if (m_executionSession.Snapshot != null)
     {
         Stream chunk = m_executionSession.Snapshot.GetChunk(streamID, ReportProcessing.ReportChunkTypes.StaticImage, out mimeType);
         if (chunk == null)
         {
             chunk = m_executionSession.Snapshot.GetChunk(streamID, ReportProcessing.ReportChunkTypes.Image, out mimeType);
         }
         if (chunk != null)
         {
             byte[] array = new byte[chunk.Length];
             chunk.Read(array, 0, (int)chunk.Length);
             return(array);
         }
     }
     using (StreamCache streamCache = new StreamCache())
     {
         m_itemContext.RSRequestParameters.SetRenderingParameters(deviceInfo);
         ReportProcessing    reportProcessing = CreateAndConfigureReportProcessing();
         IRenderingExtension newRenderer      = CreateRenderer(format, allowInternal: true);
         Microsoft.ReportingServices.ReportProcessing.RenderingContext rc = CreateRenderingContext();
         ProcessingContext        pc     = CreateProcessingContext(streamCache.StreamCallback);
         OnDemandProcessingResult result = reportProcessing.RenderSnapshotStream(newRenderer, streamID, rc, pc);
         m_executionSession.SaveProcessingResult(result);
         string encoding;
         string fileExtension;
         return(streamCache.GetMainStream(out encoding, out mimeType, out fileExtension));
     }
 }
 protected override void PreProcessSnapshot(OnDemandProcessingContext odpContext, Merge odpMerge, AspNetCore.ReportingServices.ReportIntermediateFormat.ReportInstance reportInstance, AspNetCore.ReportingServices.ReportIntermediateFormat.ReportSnapshot reportSnapshot)
 {
     if (base.ReportDefinition.HasSubReports)
     {
         ReportProcessing.FetchSubReports(base.ReportDefinition, odpContext.ChunkFactory, odpContext.ErrorContext, odpContext.OdpMetadata, odpContext.ReportContext, odpContext.SubReportCallback, 0, odpContext.SnapshotProcessing, odpContext.ProcessWithCachedData, base.GlobalIDOwnerCollection, base.PublicProcessingContext.QueryParameters);
         SubReportInitializer.InitializeSubReportOdpContext(base.ReportDefinition, odpContext);
     }
     odpMerge.FetchData(reportInstance, false);
     reportInstance.CalculateAndStoreReportVariables(odpContext);
     if (base.ReportDefinition.HasSubReports)
     {
         SubReportInitializer.InitializeSubReports(base.ReportDefinition, reportInstance, odpContext, false, false);
     }
     base.SetupInitialOdpState(odpContext, reportInstance, reportSnapshot);
     if (!base.ReportDefinition.HasSubReports)
     {
         if (base.ReportDefinition.DeferVariableEvaluation)
         {
             return;
         }
         if (!base.ReportDefinition.HasVariables)
         {
             return;
         }
     }
     Merge.PreProcessTablixes(base.ReportDefinition, odpContext, true);
 }
Beispiel #9
0
        public static PublishingResult CompileReport(ICatalogItemContext context, byte[] reportDefinition, bool generateExpressionHostWithRefusedPermissions, out ControlSnapshot snapshot)
        {
            PublishingResult publishingResult = null;

            snapshot = null;

            try
            {
                ReportProcessing reportProcessing = new ReportProcessing();
                snapshot = new ControlSnapshot();
                AppDomain         appDomain = AppDomain.CurrentDomain;
                PublishingContext reportPublishingContext = new PublishingContext(context, reportDefinition, snapshot, appDomain, generateExpressionHostWithRefusedPermissions,
                                                                                  snapshot.ReportProcessingFlags, reportProcessing.Configuration, DataProtectionLocal.Instance);
                return(reportProcessing.CreateIntermediateFormat(reportPublishingContext));
            }
            catch (Exception inner)
            {
                string text = context.ItemPathAsString;
                if (text == null)
                {
                    text = ProcessingStrings.MainReport;
                }
                throw new DefinitionInvalidException(text, inner);
            }
        }
        private ReportProcessing CreateAndConfigureReportProcessing()
        {
            ReportProcessing reportProcessing = new ReportProcessing();

            reportProcessing.Configuration = this.CreateProcessingConfiguration();
            return(reportProcessing);
        }
        public byte[] RenderStream(string format, string deviceInfo, string streamID, out string mimeType)
        {
            if (this.m_executionSession.Snapshot != null)
            {
                Stream chunk = ((SnapshotBase)this.m_executionSession.Snapshot).GetChunk(streamID, ReportProcessing.ReportChunkTypes.StaticImage, out mimeType);
                if (chunk == null)
                {
                    chunk = ((SnapshotBase)this.m_executionSession.Snapshot).GetChunk(streamID, ReportProcessing.ReportChunkTypes.Image, out mimeType);
                }
                if (chunk != null)
                {
                    byte[] array = new byte[chunk.Length];
                    chunk.Read(array, 0, (int)chunk.Length);
                    return(array);
                }
            }
            using (StreamCache streamCache = new StreamCache())
            {
                this.m_itemContext.RSRequestParameters.SetRenderingParameters(deviceInfo);
                ReportProcessing    reportProcessing = this.CreateAndConfigureReportProcessing();
                IRenderingExtension newRenderer      = this.CreateRenderer(format, true);
                AspNetCore.ReportingServices.ReportProcessing.RenderingContext rc = this.CreateRenderingContext();
                ProcessingContext        pc     = this.CreateProcessingContext(streamCache.StreamCallback);
                OnDemandProcessingResult result = reportProcessing.RenderSnapshotStream(newRenderer, streamID, rc, pc);
                this.m_executionSession.SaveProcessingResult(result);

                string text2 = default(string);
                return(streamCache.GetMainStream(out Encoding text, out mimeType, out text2));
            }
        }
 private static bool CompareWithInvariantCulture(string strOne, string strTwo)
 {
     if (ReportProcessing.CompareWithInvariantCulture(strOne, strTwo, false) == 0)
     {
         return(true);
     }
     return(false);
 }
 protected override void PrepareForExecution()
 {
     ReportProcessing.ProcessOdpToggleEvent(base.PublicRenderingContext.ShowHideToggle, base.PublicProcessingContext.ChunkFactory, base.PublicRenderingContext.EventInfo, out EventInformation newShowHideInfo, out bool showHideInfoChanged);
     if (showHideInfoChanged)
     {
         base.PublicRenderingContext.EventInfo = newShowHideInfo;
     }
 }
 protected override void PreProcessSnapshot(OnDemandProcessingContext odpContext, Merge odpMerge, AspNetCore.ReportingServices.ReportIntermediateFormat.ReportInstance reportInstance, AspNetCore.ReportingServices.ReportIntermediateFormat.ReportSnapshot reportSnapshot)
 {
     if (base.ReportDefinition.HasSubReports)
     {
         ReportProcessing.FetchSubReports(base.ReportDefinition, odpContext.ChunkFactory, odpContext.ErrorContext, odpContext.OdpMetadata, odpContext.ReportContext, odpContext.SubReportCallback, 0, odpContext.SnapshotProcessing, odpContext.ProcessWithCachedData, base.GlobalIDOwnerCollection, base.PublicProcessingContext.QueryParameters);
         SubReportInitializer.InitializeSubReportOdpContext(base.ReportDefinition, odpContext);
     }
 }
Beispiel #15
0
 internal static bool CompareWithInvariantCulture(string strOne, string strTwo)
 {
     if (ReportProcessing.CompareWithInvariantCulture(strOne, strTwo, ignoreCase: false) == 0)
     {
         return(true);
     }
     return(false);
 }
Beispiel #16
0
		protected override void PrepareForExecution()
		{
			EventInformation eventInfo = default(EventInformation);
			bool flag = default(bool);
			ReportProcessing.ProcessOdpToggleEvent(base.PublicRenderingContext.ShowHideToggle, base.PublicProcessingContext.ChunkFactory, base.PublicRenderingContext.EventInfo, out eventInfo, out flag);
			if (flag)
			{
				base.PublicRenderingContext.EventInfo = eventInfo;
			}
		}
 public int PerformSearch(int startPage, int endPage, string searchText)
 {
     using (ProcessingStreamHandler @object = new ProcessingStreamHandler())
     {
         ProcessingContext        processingContext        = this.CreateProcessingContext(@object.StreamCallback);
         ReportProcessing         reportProcessing         = this.CreateAndConfigureReportProcessing();
         OnDemandProcessingResult onDemandProcessingResult = default(OnDemandProcessingResult);
         return(reportProcessing.ProcessFindStringEvent(startPage, endPage, searchText, this.m_executionSession.EventInfo, processingContext, out onDemandProcessingResult));
     }
 }
Beispiel #18
0
        protected override void ProcessReport(ProcessingErrorContext errorContext, ExecutionLogContext executionLogContext, ref UserProfileState userProfileState)
        {
            OnDemandMetadata        onDemandMetadata        = null;
            GlobalIDOwnerCollection globalIDOwnerCollection = new GlobalIDOwnerCollection();

            onDemandMetadata        = Microsoft.ReportingServices.ReportIntermediateFormat.Persistence.ChunkManager.OnDemandProcessingManager.DeserializeOnDemandMetadata(m_dataCacheChunks, globalIDOwnerCollection);
            globalIDOwnerCollection = new GlobalIDOwnerCollection();
            Microsoft.ReportingServices.ReportIntermediateFormat.Report report = ReportProcessing.DeserializeKatmaiReport(base.PublicProcessingContext.ChunkFactory, keepReferences: false, globalIDOwnerCollection);
            ProcessReportOdpWithCachedData processReportOdpWithCachedData      = new ProcessReportOdpWithCachedData(base.Configuration, base.PublicProcessingContext, report, errorContext, base.PublicRenderingContext.StoreServerParametersCallback, globalIDOwnerCollection, executionLogContext, m_executionTimeStamp, onDemandMetadata);

            m_odpReportSnapshot = processReportOdpWithCachedData.Execute(out m_odpContext);
        }
Beispiel #19
0
        protected override void ProcessReport(ProcessingErrorContext errorContext, ExecutionLogContext executionLogContext, ref UserProfileState userProfileState)
        {
            ChunkFactoryAdapter @object           = new ChunkFactoryAdapter(this.m_yukonCompiledDefinition);
            ChunkFactoryAdapter object2           = new ChunkFactoryAdapter(base.PublicProcessingContext.ChunkFactory);
            Hashtable           definitionObjects = null;
            Report report = ReportProcessing.DeserializeReport((ReportProcessing.GetReportChunk)@object.GetReportChunk, out definitionObjects);

            base.m_reportSnapshot = base.Processing.ProcessReport(report, base.PublicProcessingContext, false, false, (ReportProcessing.GetReportChunk)object2.GetReportChunk, (ErrorContext)errorContext, this.m_executionTimeStamp, (ReportProcessing.CreateReportChunk)null, out base.m_context, out userProfileState);
            Global.Tracer.Assert(null != base.m_context, "(null != m_context)");
            executionLogContext.AddLegacyDataProcessingTime(base.m_context.DataProcessingDurationMs);
            base.m_chunkManager     = new ChunkManager.RenderingChunkManager(object2.GetReportChunk, null, definitionObjects, null, report.IntermediateFormatVersion);
            base.m_renderingContext = new AspNetCore.ReportingServices.ReportRendering.RenderingContext(base.m_reportSnapshot, base.PublicRenderingContext.Format, this.m_executionTimeStamp, report.EmbeddedImages, report.ImageStreamNames, base.PublicRenderingContext.EventInfo, base.PublicProcessingContext.ReportContext, base.ReportUri, base.RenderingParameters, object2.GetReportChunk, base.m_chunkManager, base.PublicProcessingContext.GetResourceCallback, object2.GetChunkMimeType, base.PublicRenderingContext.StoreServerParametersCallback, false, base.PublicProcessingContext.AllowUserProfileState, base.PublicRenderingContext.ReportRuntimeSetup, base.PublicProcessingContext.JobContext, base.PublicProcessingContext.DataProtection);
        }
        protected override void ProcessReport(ProcessingErrorContext errorContext, ExecutionLogContext executionLogContext, ref UserProfileState userProfileState)
        {
            ChunkFactoryAdapter @object           = new ChunkFactoryAdapter(base.PublicProcessingContext.ChunkFactory);
            ChunkFactoryAdapter object2           = new ChunkFactoryAdapter(m_originalSnapshotChunks);
            Hashtable           definitionObjects = null;
            DateTime            executionTime;
            Report report = ReportProcessing.DeserializeReportFromSnapshot(object2.GetReportChunk, out executionTime, out definitionObjects);

            m_reportSnapshot = base.Processing.ProcessReport(report, base.PublicProcessingContext, snapshotProcessing: true, processWithCachedData: false, object2.GetReportChunk, errorContext, executionTime, null, out m_context, out userProfileState);
            Global.Tracer.Assert(m_context != null, "(null != context)");
            m_chunkManager     = new ChunkManager.RenderingChunkManager(@object.GetReportChunk, null, definitionObjects, null, report.IntermediateFormatVersion);
            m_renderingContext = new Microsoft.ReportingServices.ReportRendering.RenderingContext(m_reportSnapshot, base.PublicRenderingContext.Format, executionTime, report.EmbeddedImages, report.ImageStreamNames, base.PublicRenderingContext.EventInfo, base.PublicProcessingContext.ReportContext, base.ReportUri, null, @object.GetReportChunk, m_chunkManager, base.PublicProcessingContext.GetResourceCallback, @object.GetChunkMimeType, base.PublicRenderingContext.StoreServerParametersCallback, retrieveRenderingInfo: false, base.PublicProcessingContext.AllowUserProfileState, base.PublicRenderingContext.ReportRuntimeSetup, base.PublicProcessingContext.JobContext, base.PublicProcessingContext.DataProtection);
        }
 public void PerformToggle(string toggleId)
 {
     if (toggleId != null)
     {
         ReportProcessing reportProcessing = this.CreateAndConfigureReportProcessing();
         EventInformation eventInfo        = default(EventInformation);
         bool             flag             = default(bool);
         reportProcessing.ProcessToggleEvent(toggleId, (IChunkFactory)this.m_executionSession.Snapshot, this.m_executionSession.EventInfo, out eventInfo, out flag);
         if (flag)
         {
             this.m_executionSession.EventInfo = eventInfo;
         }
     }
 }
        private void ProcessAndStoreReportParameters(ParameterInfoCollection newParameters)
        {
            ControlSnapshot chunkFactory = default(ControlSnapshot);

            this.GetCompiledReport(this.m_itemContext, false, out chunkFactory);
            using (ProcessingStreamHandler @object = new ProcessingStreamHandler())
            {
                ProcessingContext pc = this.CreateProcessingContext(newParameters, null, this.m_executionSession.Credentials, chunkFactory, @object.StreamCallback, this.CreateSubreportCallbackHandler());
                ReportProcessing  reportProcessing = this.CreateAndConfigureReportProcessing();
                bool flag = default(bool);
                reportProcessing.ProcessReportParameters(DateTime.Now, pc, false, out flag);
                this.m_executionSession.ExecutionInfo.ReportParameters = newParameters;
            }
        }
 public int PerformDocumentMapNavigation(string documentMapId)
 {
     if (documentMapId == null)
     {
         return(0);
     }
     using (ProcessingStreamHandler @object = new ProcessingStreamHandler())
     {
         ProcessingContext        processingContext        = this.CreateProcessingContext(@object.StreamCallback);
         ReportProcessing         reportProcessing         = this.CreateAndConfigureReportProcessing();
         OnDemandProcessingResult onDemandProcessingResult = default(OnDemandProcessingResult);
         return(reportProcessing.ProcessDocumentMapNavigationEvent(documentMapId, this.m_executionSession.EventInfo, processingContext, out onDemandProcessingResult));
     }
 }
        public ProcessingMessageList Render(string format, string deviceInfo, string paginationMode, bool allowInternalRenderers, IEnumerable dataSources, CreateAndRegisterStream createStreamCallback)
        {
            this.SetProcessingCulture();
            this.m_itemContext.RSRequestParameters.FormatParamValue = format;
            this.m_itemContext.RSRequestParameters.SetRenderingParameters(deviceInfo);
            this.m_itemContext.RSRequestParameters.PaginationModeValue = paginationMode;
            ReportProcessing    reportProcessing   = this.CreateAndConfigureReportProcessing();
            IRenderingExtension renderingExtension = this.CreateRenderer(format, allowInternalRenderers);
            //renderingExtension.Report = report;

            bool flag = false;

            if (format == null || this.m_executionSession.Snapshot == null)
            {
                this.ReinitializeSnapshot(null);
                flag = true;
            }
            SubreportCallbackHandler subreportHandler = this.CreateSubreportCallbackHandler();
            ProcessingContext        pc = this.CreateProcessingContext(this.m_executionSession.ExecutionInfo.ReportParameters, dataSources, this.m_executionSession.Credentials, this.m_executionSession.Snapshot, createStreamCallback, subreportHandler);

            AspNetCore.ReportingServices.ReportProcessing.RenderingContext rc = this.CreateRenderingContext();
            OnDemandProcessingResult onDemandProcessingResult = null;

            if (flag)
            {
                try
                {
                    if (renderingExtension == null)
                    {
                        onDemandProcessingResult = reportProcessing.CreateSnapshot(DateTime.Now, pc, null);
                    }
                    else
                    {
                        this.m_itemContext.RSRequestParameters.SetReportParameters(this.m_executionSession.ExecutionInfo.ReportParameters.AsNameValueCollectionInUserCulture);
                        onDemandProcessingResult = this.CreateSnapshotAndRender(reportProcessing, renderingExtension, pc, rc, subreportHandler, this.m_executionSession.ExecutionInfo.ReportParameters, this.m_executionSession.Credentials);
                    }
                }
                catch (Exception ex)
                {
                    this.m_executionSession.Snapshot = null;
                    throw;
                }
            }
            else if (renderingExtension != null)
            {
                onDemandProcessingResult = reportProcessing.RenderSnapshot(renderingExtension, rc, pc);
            }
            this.m_executionSession.SaveProcessingResult(onDemandProcessingResult);
            return(onDemandProcessingResult.Warnings);
        }
 public int PerformBookmarkNavigation(string bookmarkId, out string uniqueName)
 {
     uniqueName = null;
     if (bookmarkId == null)
     {
         return(0);
     }
     using (ProcessingStreamHandler @object = new ProcessingStreamHandler())
     {
         ProcessingContext        processingContext        = this.CreateProcessingContext(@object.StreamCallback);
         ReportProcessing         reportProcessing         = this.CreateAndConfigureReportProcessing();
         OnDemandProcessingResult onDemandProcessingResult = default(OnDemandProcessingResult);
         return(reportProcessing.ProcessBookmarkNavigationEvent(bookmarkId, this.m_executionSession.EventInfo, processingContext, out uniqueName, out onDemandProcessingResult));
     }
 }
 public string PerformDrillthrough(string drillthroughId, out NameValueCollection resultParameters)
 {
     resultParameters = null;
     if (drillthroughId == null)
     {
         return(null);
     }
     using (ProcessingStreamHandler @object = new ProcessingStreamHandler())
     {
         ProcessingContext        processingContext        = this.CreateProcessingContext(@object.StreamCallback);
         ReportProcessing         reportProcessing         = this.CreateAndConfigureReportProcessing();
         OnDemandProcessingResult onDemandProcessingResult = default(OnDemandProcessingResult);
         return(reportProcessing.ProcessDrillthroughEvent(drillthroughId, this.m_executionSession.EventInfo, processingContext, out resultParameters, out onDemandProcessingResult));
     }
 }
Beispiel #27
0
        protected override void ProcessReport(ProcessingErrorContext errorContext, ExecutionLogContext executionLogContext, ref UserProfileState userProfileState)
        {
            ChunkFactoryAdapter @object = new ChunkFactoryAdapter(base.PublicProcessingContext.ChunkFactory);

            m_reportSnapshot = ReportProcessing.DeserializeReportSnapshot(@object.GetReportChunk, @object.CreateReportChunk, base.PublicProcessingContext.GetResourceCallback, base.PublicRenderingContext, base.PublicProcessingContext.DataProtection, out Hashtable instanceObjects, out Hashtable definitionObjects, out IntermediateFormatReader.State declarationsRead, out bool isOldSnapshot);
            Global.Tracer.Assert(m_reportSnapshot != null, "(null != reportSnapshot)");
            Global.Tracer.Assert(m_reportSnapshot.Report != null, "(null != reportSnapshot.Report)");
            Global.Tracer.Assert(m_reportSnapshot.ReportInstance != null, "(null != reportSnapshot.ReportInstance)");
            m_chunkManager = new ChunkManager.RenderingChunkManager(@object.GetReportChunk, instanceObjects, definitionObjects, declarationsRead, m_reportSnapshot.Report.IntermediateFormatVersion);
            base.Processing.ProcessShowHideToggle(base.PublicRenderingContext.ShowHideToggle, m_reportSnapshot, base.PublicRenderingContext.EventInfo, m_chunkManager, out bool showHideInformationChanged, out EventInformation newOverrideInformation);
            if (showHideInformationChanged)
            {
                base.PublicRenderingContext.EventInfo = newOverrideInformation;
            }
            m_renderingContext = new Microsoft.ReportingServices.ReportRendering.RenderingContext(retrieveRenderingInfo: IsRenderStream || !isOldSnapshot, reportSnapshot: m_reportSnapshot, rendererID: base.PublicRenderingContext.Format, executionTime: m_reportSnapshot.ExecutionTime, embeddedImages: m_reportSnapshot.Report.EmbeddedImages, imageStreamNames: m_reportSnapshot.Report.ImageStreamNames, eventInfo: base.PublicRenderingContext.EventInfo, reportContext: base.PublicRenderingContext.ReportContext, contextUri: base.PublicRenderingContext.ReportUri, reportParameters: base.RenderingParameters, getChunkCallback: @object.GetReportChunk, chunkManager: m_chunkManager, getResourceCallback: base.PublicProcessingContext.GetResourceCallback, getChunkMimeType: @object.GetChunkMimeType, storeServerParameters: base.PublicRenderingContext.StoreServerParametersCallback, allowUserProfileState: base.PublicRenderingContext.AllowUserProfileState, reportRuntimeSetup: base.PublicRenderingContext.ReportRuntimeSetup, jobContext: base.PublicProcessingContext.JobContext, dataProtection: base.PublicProcessingContext.DataProtection);
        }
 public IDocumentMap GetDocumentMap()
 {
     if (!this.m_executionSession.ExecutionInfo.HasDocMap)
     {
         return(null);
     }
     using (ProcessingStreamHandler @object = new ProcessingStreamHandler())
     {
         ProcessingContext        processingContext = this.CreateProcessingContext(@object.StreamCallback);
         ReportProcessing         reportProcessing  = this.CreateAndConfigureReportProcessing();
         OnDemandProcessingResult result            = default(OnDemandProcessingResult);
         IDocumentMap             documentMap       = reportProcessing.GetDocumentMap(this.m_executionSession.EventInfo, processingContext, out result);
         this.m_executionSession.SaveProcessingResult(result);
         return(documentMap);
     }
 }
 private void GetAllReportDataSourcesAndSharedDataSets(out RuntimeDataSourceInfoCollection runtimeDataSources, out RuntimeDataSetInfoCollection runtimeDataSets)
 {
     if (!this.DataRetrieval.SupportsQueries)
     {
         runtimeDataSources = new RuntimeDataSourceInfoCollection();
         runtimeDataSets    = new RuntimeDataSetInfoCollection();
     }
     else
     {
         ControlSnapshot          getCompiledDefinitionFactory = default(ControlSnapshot);
         PublishingResult         compiledReport        = this.GetCompiledReport(this.m_itemContext, false, out getCompiledDefinitionFactory);
         DataSourceInfoCollection existingDataSources   = this.ResolveSharedDataSources(compiledReport.DataSources);
         DataSetInfoCollection    dataSetInfoCollection = this.ResolveSharedDataSets(compiledReport.SharedDataSets);
         DataSourceInfoCollection dataSources           = this.CompileDataSetsAndCombineDataSources(dataSetInfoCollection, existingDataSources);
         ReportProcessing         reportProcessing      = this.CreateAndConfigureReportProcessing();
         reportProcessing.GetAllDataSources((ICatalogItemContext)this.m_itemContext, (IChunkFactory)getCompiledDefinitionFactory, (ReportProcessing.OnDemandSubReportDataSourcesCallback) this.OnGetSubReportDataSources, dataSources, dataSetInfoCollection, true, new ServerDataSourceSettings(true, true), out runtimeDataSources, out runtimeDataSets);
     }
 }
Beispiel #30
0
        public override void Update(object[] expressions, IErrorContext iErrorContext)
        {
            Global.Tracer.Assert(null != expressions);
            Global.Tracer.Assert(1 == expressions.Length);
            object       obj      = expressions[0];
            DataTypeCode typeCode = DataAggregate.GetTypeCode(obj);

            if (!DataAggregate.IsNull(typeCode))
            {
                if (!DataAggregate.IsVariant(typeCode))
                {
                    iErrorContext.Register(ProcessingErrorCode.rsMinMaxOfNonSortableData, Severity.Warning);
                    throw new InvalidOperationException();
                }
                if (this.m_expressionType == DataTypeCode.Null)
                {
                    this.m_expressionType = typeCode;
                }
                else if (typeCode != this.m_expressionType)
                {
                    iErrorContext.Register(ProcessingErrorCode.rsAggregateOfMixedDataTypes, Severity.Warning);
                    throw new InvalidOperationException();
                }
                if (this.m_currentMax == null)
                {
                    this.m_currentMax = obj;
                }
                else
                {
                    try
                    {
                        int num = ReportProcessing.CompareTo(this.m_currentMax, obj, this.m_compareInfo, this.m_compareOptions);
                        if (num < 0)
                        {
                            this.m_currentMax = obj;
                        }
                    }
                    catch
                    {
                        iErrorContext.Register(ProcessingErrorCode.rsMinMaxOfNonSortableData, Severity.Warning);
                    }
                }
            }
        }