Exemple #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();
 }
Exemple #2
0
 internal void UpdatePageSection(Microsoft.ReportingServices.ReportRendering.PageSection renderPageSection)
 {
     m_renderReportItem = renderPageSection;
     if (m_reportItems != null)
     {
         m_reportItems.UpdateRenderReportItem(renderPageSection.ReportItemCollection);
     }
 }
Exemple #3
0
 internal void UpdateWithCurrentPageSections(Microsoft.ReportingServices.ReportRendering.PageSection header, Microsoft.ReportingServices.ReportRendering.PageSection footer)
 {
     if (header != null)
     {
         PageHeader.UpdatePageSection(header);
     }
     if (footer != null)
     {
         PageFooter.UpdatePageSection(footer);
     }
 }
Exemple #4
0
        internal bool Search(int searchPage, string findValue)
        {
            SearchContext searchContext = new SearchContext(searchPage, findValue, 0, NumberOfPages - 1);
            PageSection   pageSection   = PageHeader;
            PageSection   pageSection2  = PageFooter;
            bool          flag          = false;
            bool          flag2         = false;

            if (pageSection != null && ((searchPage > 0 && searchPage < NumberOfPages - 1) || (searchPage == 0 && pageSection.PrintOnFirstPage) || (searchPage != 0 && searchPage == NumberOfPages - 1 && pageSection.PrintOnLastPage)))
            {
                flag = true;
            }
            if (pageSection2 != null && ((searchPage > 0 && searchPage < NumberOfPages - 1) || (searchPage != NumberOfPages - 1 && searchPage == 0 && pageSection2.PrintOnFirstPage) || (searchPage == NumberOfPages - 1 && pageSection2.PrintOnLastPage)))
            {
                flag2 = true;
            }
            if ((flag || flag2) && NeedsHeaderFooterEvaluation)
            {
                PageSection pageHeader = null;
                PageSection pageFooter = null;
                Microsoft.ReportingServices.ReportProcessing.ReportProcessing.EvaluateHeaderFooterExpressions(searchPage + 1, NumberOfPages, this, null, out pageHeader, out pageFooter);
                if (m_reportDef.PageHeaderEvaluation)
                {
                    pageSection = pageHeader;
                }
                if (m_reportDef.PageFooterEvaluation)
                {
                    pageSection2 = pageFooter;
                }
            }
            bool flag3 = false;

            if (flag)
            {
                flag3 = pageSection.Search(searchContext);
            }
            if (!flag3)
            {
                flag3 = Body.Search(searchContext);
                if (!flag3 && flag2)
                {
                    flag3 = pageSection2.Search(searchContext);
                }
            }
            return(flag3);
        }
        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);
        }
Exemple #6
0
 internal override void UpdatePageSections(ReportSection section)
 {
     Microsoft.ReportingServices.ReportRendering.PageSection header = null;
     Microsoft.ReportingServices.ReportRendering.PageSection footer = null;
     foreach (AggregatesImpl value in m_aggregatesOverReportItems.Values)
     {
         foreach (DataAggregateObj @object in value.Objects)
         {
             m_processingContext.ReportObjectModel.AggregatesImpl.Add(@object);
         }
     }
     if (m_report.PageHeaderEvaluation)
     {
         header = GenerateRenderPageSection(m_report.PageHeader, "ph");
     }
     if (m_report.PageFooterEvaluation)
     {
         footer = GenerateRenderPageSection(m_report.PageFooter, "pf");
     }
     m_aggregates = null;
     m_aggregatesOverReportItems = null;
     section.Page.UpdateWithCurrentPageSections(header, footer);
 }
Exemple #7
0
 protected Page(PageSection pageHeader, PageSection pageFooter)
 {
     Header = pageHeader;
     Footer = pageFooter;
 }
Exemple #8
0
 internal PageSection(IDefinitionPath parentDefinitionPath, bool isHeader, Microsoft.ReportingServices.ReportRendering.PageSection renderPageSection, RenderingContext renderingContext)
     : base(parentDefinitionPath, renderPageSection, renderingContext)
 {
     m_isHeader = isHeader;
 }