コード例 #1
0
 internal Report(Microsoft.ReportingServices.ReportProcessing.Report reportDef, ReportInstance reportInstance, RenderingContext renderingContext, string reportName, string description, CultureInfo defaultLanguage)
 {
     m_reportDef        = reportDef;
     m_reportInstance   = reportInstance;
     m_renderingContext = renderingContext;
     m_reportBody       = null;
     m_pageHeader       = null;
     m_pageFooter       = null;
     m_reportPagination = null;
     m_name             = reportName;
     m_description      = description;
     m_reportUrl        = null;
     m_documentMapRoot  = null;
     m_reportParameters = null;
     if (reportDef.Language != null)
     {
         if (reportDef.Language.Type == ExpressionInfo.Types.Constant)
         {
             m_reportLanguage = reportDef.Language.Value;
         }
         else if (reportInstance != null)
         {
             m_reportLanguage = reportInstance.Language;
         }
     }
     if (m_reportLanguage == null && defaultLanguage != null)
     {
         m_reportLanguage = defaultLanguage.Name;
     }
     AdjustBodyWhitespace();
 }
コード例 #2
0
        private void InitializeEnvironment()
        {
            m_report = m_romReport.RenderReport.ReportDef;
            Microsoft.ReportingServices.ReportProcessing.ReportInstance  reportInstance   = m_romReport.RenderReport.ReportInstance;
            Microsoft.ReportingServices.ReportRendering.RenderingContext renderingContext = m_romReport.RenderReport.RenderingContext;
            ReportSnapshot     reportSnapshot     = renderingContext.ReportSnapshot;
            ReportInstanceInfo reportInstanceInfo = (ReportInstanceInfo)reportInstance.GetInstanceInfo(renderingContext.ChunkManager);

            m_processingContext = new Microsoft.ReportingServices.ReportProcessing.ReportProcessing.ProcessingContext(renderingContext.TopLevelReportContext, m_report.ShowHideType, renderingContext.GetResourceCallback, m_report.EmbeddedImages, m_report.ImageStreamNames, new ProcessingErrorContext(), !m_report.PageMergeOnePass, renderingContext.AllowUserProfileState, renderingContext.ReportRuntimeSetup, renderingContext.DataProtection);
            m_reportCulture     = Localization.DefaultReportServerSpecificCulture;
            if (m_report.Language != null)
            {
                string text = null;
                text = ((m_report.Language.Type != ExpressionInfo.Types.Constant) ? reportInstance.Language : m_report.Language.Value);
                if (text != null)
                {
                    try
                    {
                        m_reportCulture = new CultureInfo(text, useUserOverride: false);
                        if (m_reportCulture.IsNeutralCulture)
                        {
                            m_reportCulture = CultureInfo.CreateSpecificCulture(text);
                            m_reportCulture = new CultureInfo(m_reportCulture.Name, useUserOverride: false);
                        }
                    }
                    catch (Exception e)
                    {
                        if (AsynchronousExceptionDetection.IsStoppingException(e))
                        {
                            throw;
                        }
                    }
                }
            }
            m_processingContext.ReportObjectModel = new ObjectModelImpl(m_processingContext);
            Global.Tracer.Assert(m_processingContext.ReportRuntime == null, "(m_processingContext.ReportRuntime == null)");
            m_processingContext.ReportRuntime = new ReportRuntime(m_processingContext.ReportObjectModel, m_processingContext.ErrorContext);
            m_processingContext.ReportObjectModel.FieldsImpl      = new FieldsImpl();
            m_processingContext.ReportObjectModel.ParametersImpl  = new ParametersImpl(reportInstanceInfo.Parameters.Count);
            m_processingContext.ReportObjectModel.GlobalsImpl     = new GlobalsImpl(reportInstanceInfo.ReportName, m_currentPageNumber, m_totalPages, reportSnapshot.ExecutionTime, reportSnapshot.ReportServerUrl, reportSnapshot.ReportFolder);
            m_processingContext.ReportObjectModel.UserImpl        = new UserImpl(reportSnapshot.RequestUserName, reportSnapshot.Language, m_processingContext.AllowUserProfileState);
            m_processingContext.ReportObjectModel.DataSetsImpl    = new DataSetsImpl();
            m_processingContext.ReportObjectModel.DataSourcesImpl = new DataSourcesImpl(m_report.DataSourceCount);
            for (int i = 0; i < reportInstanceInfo.Parameters.Count; i++)
            {
                m_processingContext.ReportObjectModel.ParametersImpl.Add(reportInstanceInfo.Parameters[i].Name, new ParameterImpl(reportInstanceInfo.Parameters[i].Values, reportInstanceInfo.Parameters[i].Labels, reportInstanceInfo.Parameters[i].MultiValue));
            }
            m_processingContext.ReportRuntime.LoadCompiledCode(m_report, parametersOnly: false, m_processingContext.ReportObjectModel, m_processingContext.ReportRuntimeSetup);
        }
コード例 #3
0
 internal Report(Microsoft.ReportingServices.ReportProcessing.Report reportDef, Microsoft.ReportingServices.ReportProcessing.ReportInstance reportInstance, Microsoft.ReportingServices.ReportRendering.RenderingContext oldRenderingContext, RenderingContext renderingContext, string reportName, string description)
 {
     m_renderReport         = new Microsoft.ReportingServices.ReportRendering.Report(reportDef, reportInstance, oldRenderingContext, reportName, description, Localization.DefaultReportServerSpecificCulture);
     m_parentDefinitionPath = null;
     m_isOldSnapshot        = true;
     m_subreportInSubtotal  = false;
     m_renderingContext     = renderingContext;
     m_name        = reportName;
     m_description = description;
     if (m_renderReport.NeedsHeaderFooterEvaluation)
     {
         m_pageEvaluation = new ShimPageEvaluation(this);
         m_renderingContext.SetPageEvaluation(m_pageEvaluation);
     }
 }
コード例 #4
0
        internal PageSection GetHeader(PageSectionInstance headerInstance)
        {
            PageSection result = null;

            Microsoft.ReportingServices.ReportProcessing.Report reportDef = m_report.ReportDef;
            if (reportDef != null)
            {
                if (!reportDef.PageHeaderEvaluation)
                {
                    result = m_report.PageHeader;
                }
                else if (reportDef.PageHeader != null && headerInstance != null)
                {
                    string           text             = headerInstance.PageNumber + "ph";
                    RenderingContext renderingContext = new RenderingContext(m_report.RenderingContext, text);
                    result = new PageSection(text, reportDef.PageHeader, headerInstance, m_report, renderingContext, pageDef: false);
                }
            }
            return(result);
        }
コード例 #5
0
 internal override ReportProcessing.ProcessingContext CreateInternalProcessingContext(string chartName, Microsoft.ReportingServices.ReportProcessing.Report report, ErrorContext errorContext, DateTime executionTime, UserProfileState allowUserProfileState, bool isHistorySnapshot, bool snapshotProcessing, bool processWithCachedData, ReportProcessing.GetReportChunk getChunkCallback, ReportProcessing.CreateReportChunk cacheDataCallback)
 {
     Microsoft.ReportingServices.ReportProcessing.Global.Tracer.Assert(condition: false, "CreateInternalProcessingContext is not used for ODP Engine Controls");
     return(null);
 }