Example #1
0
        private void InitializeEnvironment()
        {
            this.m_report = base.m_romReport.RenderReport.ReportDef;
            AspNetCore.ReportingServices.ReportProcessing.ReportInstance  reportInstance   = base.m_romReport.RenderReport.ReportInstance;
            AspNetCore.ReportingServices.ReportRendering.RenderingContext renderingContext = base.m_romReport.RenderReport.RenderingContext;
            ReportSnapshot     reportSnapshot     = renderingContext.ReportSnapshot;
            ReportInstanceInfo reportInstanceInfo = (ReportInstanceInfo)reportInstance.GetInstanceInfo(renderingContext.ChunkManager);

            this.m_processingContext = new AspNetCore.ReportingServices.ReportProcessing.ReportProcessing.ProcessingContext(renderingContext.TopLevelReportContext, this.m_report.ShowHideType, renderingContext.GetResourceCallback, this.m_report.EmbeddedImages, this.m_report.ImageStreamNames, new ProcessingErrorContext(), !this.m_report.PageMergeOnePass, renderingContext.AllowUserProfileState, renderingContext.ReportRuntimeSetup, renderingContext.DataProtection);
            this.m_reportCulture     = Localization.DefaultReportServerSpecificCulture;
            if (this.m_report.Language != null)
            {
                string text = null;
                text = ((this.m_report.Language.Type != ExpressionInfo.Types.Constant) ? reportInstance.Language : this.m_report.Language.Value);
                if (text != null)
                {
                    try
                    {
                        this.m_reportCulture = new CultureInfo(text, false);
                        if (this.m_reportCulture.IsNeutralCulture)
                        {
                            this.m_reportCulture = CultureInfo.CreateSpecificCulture(text);
                            this.m_reportCulture = new CultureInfo(this.m_reportCulture.Name, false);
                        }
                    }
                    catch (Exception e)
                    {
                        if (!AsynchronousExceptionDetection.IsStoppingException(e))
                        {
                            goto end_IL_0140;
                        }
                        throw;
                        end_IL_0140 :;
                    }
                }
            }
            this.m_processingContext.ReportObjectModel = new ObjectModelImpl(this.m_processingContext);
            Global.Tracer.Assert(this.m_processingContext.ReportRuntime == null, "(m_processingContext.ReportRuntime == null)");
            this.m_processingContext.ReportRuntime = new ReportRuntime(this.m_processingContext.ReportObjectModel, this.m_processingContext.ErrorContext);
            this.m_processingContext.ReportObjectModel.FieldsImpl      = new FieldsImpl();
            this.m_processingContext.ReportObjectModel.ParametersImpl  = new ParametersImpl(reportInstanceInfo.Parameters.Count);
            this.m_processingContext.ReportObjectModel.GlobalsImpl     = new GlobalsImpl(reportInstanceInfo.ReportName, base.m_currentPageNumber, base.m_totalPages, reportSnapshot.ExecutionTime, reportSnapshot.ReportServerUrl, reportSnapshot.ReportFolder);
            this.m_processingContext.ReportObjectModel.UserImpl        = new UserImpl(reportSnapshot.RequestUserName, reportSnapshot.Language, this.m_processingContext.AllowUserProfileState);
            this.m_processingContext.ReportObjectModel.DataSetsImpl    = new DataSetsImpl();
            this.m_processingContext.ReportObjectModel.DataSourcesImpl = new DataSourcesImpl(this.m_report.DataSourceCount);
            for (int i = 0; i < reportInstanceInfo.Parameters.Count; i++)
            {
                this.m_processingContext.ReportObjectModel.ParametersImpl.Add(reportInstanceInfo.Parameters[i].Name, new ParameterImpl(reportInstanceInfo.Parameters[i].Values, reportInstanceInfo.Parameters[i].Labels, reportInstanceInfo.Parameters[i].MultiValue));
            }
            this.m_processingContext.ReportRuntime.LoadCompiledCode(this.m_report, false, this.m_processingContext.ReportObjectModel, this.m_processingContext.ReportRuntimeSetup);
        }
Example #2
0
 public ReportInstanceInfo(ReportProcessing.ProcessingContext pc, Report reportItemDef, ReportInstance owner, ParameterInfoCollection parameters, bool noRows)
     : base(pc, reportItemDef, owner, true)
 {
     this.m_bodyUniqueName = pc.CreateUniqueName();
     this.m_reportName     = pc.ReportContext.ItemName;
     this.m_parameters     = new ParameterInfoCollection();
     if (parameters != null && parameters.Count > 0)
     {
         parameters.CopyTo(this.m_parameters);
     }
     this.m_noRows = noRows;
 }
Example #3
0
 public Report(AspNetCore.ReportingServices.ReportProcessing.Report reportDef, AspNetCore.ReportingServices.ReportProcessing.ReportInstance reportInstance, AspNetCore.ReportingServices.ReportRendering.RenderingContext oldRenderingContext, RenderingContext renderingContext, string reportName, string description)
 {
     this.m_renderReport         = new AspNetCore.ReportingServices.ReportRendering.Report(reportDef, reportInstance, oldRenderingContext, reportName, description, Localization.DefaultReportServerSpecificCulture);
     this.m_parentDefinitionPath = null;
     this.m_isOldSnapshot        = true;
     this.m_subreportInSubtotal  = false;
     this.m_renderingContext     = renderingContext;
     this.m_name        = reportName;
     this.m_description = description;
     if (this.m_renderReport.NeedsHeaderFooterEvaluation)
     {
         this.m_pageEvaluation = new ShimPageEvaluation(this);
         this.m_renderingContext.SetPageEvaluation(this.m_pageEvaluation);
     }
 }