public void RenderReportItem(RPLWriter rplWriter, string reportItemName)
        {
            AspNetCore.ReportingServices.OnDemandReportRendering.ReportSection reportSection = null;
            ReportItem reportItem = SelectiveRendering.FindReportItem(this.m_report, SelectiveRendering.SplitReportItemPath(reportItemName), out reportSection);

            if (reportItem == null)
            {
                throw new SelectiveRenderingCannotFindReportItemException(reportItemName);
            }
            CustomReportItem criOwner = reportItem.CriOwner;

            if (criOwner != null)
            {
                criOwner.DynamicWidth  = ReportSize.FromMillimeters(this.m_paginationSettings.PhysicalPageWidth);
                criOwner.DynamicHeight = ReportSize.FromMillimeters(this.m_paginationSettings.PhysicalPageHeight);
            }
            PageItem pageItem = PageItem.Create(reportItem, false, this.m_pageContext);

            pageItem.ItemPageSizes.Top    = 0.0;
            pageItem.ItemPageSizes.Left   = 0.0;
            pageItem.ItemPageSizes.Width  = this.m_paginationSettings.PhysicalPageWidth;
            pageItem.ItemPageSizes.Height = this.m_paginationSettings.PhysicalPageHeight;
            ItemContext itemContext = new ItemContext(rplWriter, this.m_pageContext, this.m_report, reportSection);

            if (rplWriter.BinaryWriter != null)
            {
                ReportToRplStreamWriter.Write(pageItem, itemContext);
            }
            else
            {
                ReportToRplOmWriter.Write(pageItem, itemContext);
            }
            this.Done = true;
        }
 public ItemContext(RPLWriter rplWriter, PageContext pageContext, AspNetCore.ReportingServices.OnDemandReportRendering.Report report, AspNetCore.ReportingServices.OnDemandReportRendering.ReportSection reportSection)
 {
     this.RPLWriter     = rplWriter;
     this.PageContext   = pageContext;
     this.Report        = report;
     this.ReportSection = reportSection;
 }
Esempio n. 3
0
 public ReportSection(AspNetCore.ReportingServices.OnDemandReportRendering.ReportSection reportSection, PageContext pageContext, PaginationSettings paginationSettings, SectionPaginationSettings sectionPaginationSettings)
 {
     this.m_reportSection       = reportSection;
     this.m_pageContext         = pageContext;
     this.m_pageSettings        = paginationSettings;
     this.m_sectionPageSettings = sectionPaginationSettings;
 }
Esempio n. 4
0
 public Page(IDefinitionPath parentDefinitionPath, AspNetCore.ReportingServices.ReportRendering.Report renderReport, RenderingContext renderingContext, ReportSection reportSection)
     : base(parentDefinitionPath, renderingContext)
 {
     base.m_isOldSnapshot = true;
     this.m_renderReport  = renderReport;
     this.m_reportSection = reportSection;
 }
Esempio n. 5
0
 public Page(IDefinitionPath parentDefinitionPath, RenderingContext renderingContext, ReportSection reportSection)
     : base(null, parentDefinitionPath, reportSection.SectionDef, renderingContext)
 {
     base.m_isOldSnapshot = false;
     this.m_pageDef       = reportSection.SectionDef.Page;
     this.m_reportSection = reportSection;
 }
		public override void Reset(ReportSection section, int newPageNumber, int newTotalPages, int newOverallPageNumber, int newOverallTotalPages)
		{
			base.Reset(section, newPageNumber, newTotalPages, newOverallPageNumber, newOverallTotalPages);
			if (section.Page.PageHeader == null && section.Page.PageFooter == null)
			{
				return;
			}
			this.PageInit(section);
		}
Esempio n. 7
0
        public void SetContext()
        {
            ReportSectionCollection reportSections = this.m_report.ReportSections;

            for (int i = 0; i < reportSections.Count; i++)
            {
                AspNetCore.ReportingServices.OnDemandReportRendering.ReportSection reportSection = ((ReportElementCollectionBase <AspNetCore.ReportingServices.OnDemandReportRendering.ReportSection>)reportSections)[i];
                ReportSection reportSection2 = new ReportSection(reportSection, this.m_pageContext, this.m_pageSettings, this.m_pageSettings.SectionPaginationSettings[i]);
                reportSection2.SetContext();
                this.m_sections.Add(reportSection2);
            }
        }
Esempio n. 8
0
 public SectionPaginationSettings(AspNetCore.ReportingServices.OnDemandReportRendering.ReportSection reportSection)
 {
     this.m_columns       = reportSection.Page.Columns;
     this.m_columnSpacing = reportSection.Page.ColumnSpacing.ToMillimeters();
     if (reportSection.Page.PageHeader != null)
     {
         this.m_headerHeight = reportSection.Page.PageHeader.Height.ToMillimeters();
     }
     if (reportSection.Page.PageFooter != null)
     {
         this.m_footerHeight = reportSection.Page.PageFooter.Height.ToMillimeters();
     }
 }
		public override void UpdatePageSections(ReportSection section)
		{
			if (section.Page.PageHeader == null && section.Page.PageFooter == null)
			{
				return;
			}
			AspNetCore.ReportingServices.ReportProcessing.OnDemandReportObjectModel.ObjectModelImpl reportObjectModel = this.m_processingContext.ReportObjectModel;
			reportObjectModel.GlobalsImpl.SetPageName(base.m_pageName);
			if (section.PageAggregatesOverReportItems == null)
			{
				throw new RenderingObjectModelException(ProcessingErrorCode.rsInvalidPageSectionState, section.SectionIndex);
			}
			foreach (AspNetCore.ReportingServices.ReportProcessing.OnDemandReportObjectModel.AggregatesImpl value in section.PageAggregatesOverReportItems.Values)
			{
				foreach (AspNetCore.ReportingServices.ReportIntermediateFormat.DataAggregateObj @object in value.Objects)
				{
					reportObjectModel.AggregatesImpl.Add(@object);
				}
			}
			section.PageAggregatesOverReportItems = null;
		}
Esempio n. 10
0
 public override void UpdatePageSections(ReportSection section)
 {
     AspNetCore.ReportingServices.ReportRendering.PageSection header = null;
     AspNetCore.ReportingServices.ReportRendering.PageSection footer = null;
     foreach (AggregatesImpl value in this.m_aggregatesOverReportItems.Values)
     {
         foreach (DataAggregateObj @object in value.Objects)
         {
             this.m_processingContext.ReportObjectModel.AggregatesImpl.Add(@object);
         }
     }
     if (this.m_report.PageHeaderEvaluation)
     {
         header = this.GenerateRenderPageSection(this.m_report.PageHeader, "ph");
     }
     if (this.m_report.PageFooterEvaluation)
     {
         footer = this.GenerateRenderPageSection(this.m_report.PageFooter, "pf");
     }
     this.m_aggregates = null;
     this.m_aggregatesOverReportItems = null;
     section.Page.UpdateWithCurrentPageSections(header, footer);
 }
		public override void Add(string textboxName, object textboxValue)
		{
			if (textboxName == null)
			{
				throw new RenderingObjectModelException(ProcessingErrorCode.rsInvalidOperation);
			}
			if (this.m_processingContext.ReportItemsReferenced)
			{
				AspNetCore.ReportingServices.ReportProcessing.OnDemandReportObjectModel.TextBoxImpl textBoxImpl = (AspNetCore.ReportingServices.ReportProcessing.OnDemandReportObjectModel.TextBoxImpl)((ReportItems)this.m_processingContext.ReportObjectModel.ReportItemsImpl)[textboxName];
				if (textBoxImpl != null)
				{
					textBoxImpl.SetResult(new AspNetCore.ReportingServices.RdlExpressions.VariantResult(false, textboxValue));
				}
				ReportSection reportSection = default(ReportSection);
				AspNetCore.ReportingServices.ReportProcessing.OnDemandReportObjectModel.AggregatesImpl aggregatesImpl = default(AspNetCore.ReportingServices.ReportProcessing.OnDemandReportObjectModel.AggregatesImpl);
				if (this.m_reportItemToReportSection.TryGetValue(textboxName, out reportSection) && reportSection.PageAggregatesOverReportItems.TryGetValue(textboxName, out aggregatesImpl))
				{
					foreach (AspNetCore.ReportingServices.ReportIntermediateFormat.DataAggregateObj @object in aggregatesImpl.Objects)
					{
						@object.Update();
					}
				}
			}
		}
Esempio n. 12
0
 public ReportSectionInstance(ReportSection sectionDef)
     : base(sectionDef)
 {
 }
 public ReportSection(AspNetCore.ReportingServices.OnDemandReportRendering.ReportSection section, PageContext pageContext)
 {
     this.m_reportSectionDef = section;
     this.m_pageContext      = pageContext;
 }
 private void Visit(AspNetCore.ReportingServices.OnDemandReportRendering.ReportSection section)
 {
     this.Visit(section.Body.ReportItemCollection);
     this.VisitStyle(section.Body.Style);
     this.VisitStyle(section.Page.Style);
 }
Esempio n. 15
0
 private void WriteReportPageLayout2008(RPLWriter rplWriter, double bodyWidth, double bodyHeight)
 {
     if (rplWriter != null)
     {
         BinaryWriter binaryWriter = rplWriter.BinaryWriter;
         AspNetCore.ReportingServices.OnDemandReportRendering.ReportSection reportSection = ((ReportElementCollectionBase <AspNetCore.ReportingServices.OnDemandReportRendering.ReportSection>) this.m_report.ReportSections)[0];
         Page page = reportSection.Page;
         if (binaryWriter != null)
         {
             Stream baseStream = binaryWriter.BaseStream;
             long   position   = baseStream.Position;
             binaryWriter.Write((byte)16);
             binaryWriter.Write(this.m_columnsOffset);
             binaryWriter.Write(1);
             binaryWriter.Write(0f);
             binaryWriter.Write(0f);
             binaryWriter.Write((float)bodyWidth);
             binaryWriter.Write((float)bodyHeight);
             binaryWriter.Write(0);
             binaryWriter.Write((byte)0);
             binaryWriter.Write(this.m_bodyOffset);
             this.m_columnsOffset = baseStream.Position;
             binaryWriter.Write((byte)254);
             binaryWriter.Write(position);
             binaryWriter.Write((byte)255);
             binaryWriter.Write((byte)1);
             binaryWriter.Write((byte)3);
             binaryWriter.Write((byte)1);
             binaryWriter.Write(reportSection.ID);
             binaryWriter.Write((byte)0);
             binaryWriter.Write(page.Instance.UniqueName);
             binaryWriter.Write((byte)16);
             binaryWriter.Write((float)page.PageHeight.ToMillimeters());
             binaryWriter.Write((byte)17);
             binaryWriter.Write((float)page.PageWidth.ToMillimeters());
             binaryWriter.Write((byte)20);
             binaryWriter.Write((float)page.BottomMargin.ToMillimeters());
             binaryWriter.Write((byte)19);
             binaryWriter.Write((float)page.LeftMargin.ToMillimeters());
             binaryWriter.Write((byte)21);
             binaryWriter.Write((float)page.RightMargin.ToMillimeters());
             binaryWriter.Write((byte)18);
             binaryWriter.Write((float)page.TopMargin.ToMillimeters());
             binaryWriter.Write((byte)23);
             binaryWriter.Write(page.Columns);
             binaryWriter.Write((byte)22);
             binaryWriter.Write((float)page.ColumnSpacing.ToMillimeters());
             ReportPageLayout reportPageLayout = new ReportPageLayout(page);
             reportPageLayout.WriteElementStyle(rplWriter, this.m_pageContext);
             binaryWriter.Write((byte)255);
         }
         else
         {
             RPLPageLayout rPLPageLayout = new RPLPageLayout();
             rplWriter.Report.RPLPaginatedPages[0].PageLayout = rPLPageLayout;
             rPLPageLayout.PageHeight   = (float)page.PageHeight.ToMillimeters();
             rPLPageLayout.PageWidth    = (float)page.PageWidth.ToMillimeters();
             rPLPageLayout.MarginBottom = (float)page.BottomMargin.ToMillimeters();
             rPLPageLayout.MarginLeft   = (float)page.LeftMargin.ToMillimeters();
             rPLPageLayout.MarginRight  = (float)page.RightMargin.ToMillimeters();
             rPLPageLayout.MarginTop    = (float)page.TopMargin.ToMillimeters();
             ReportPageLayout reportPageLayout2 = new ReportPageLayout(page);
             reportPageLayout2.WriteElementStyle(rplWriter, this.m_pageContext);
         }
     }
 }
        private static ReportItem FindReportItem(AspNetCore.ReportingServices.OnDemandReportRendering.Report report, IEnumerable <string> reportItemPathSteps, out AspNetCore.ReportingServices.OnDemandReportRendering.ReportSection reportSection)
        {
            reportSection = null;
            int num = reportItemPathSteps.Count();

            if (num == 0)
            {
                return(null);
            }
            bool       flag       = num > 1;
            string     text       = reportItemPathSteps.FirstOrDefault();
            ReportItem reportItem = null;

            foreach (AspNetCore.ReportingServices.OnDemandReportRendering.ReportSection reportSection2 in report.ReportSections)
            {
                foreach (ReportItem item in reportSection2.Body.ReportItemCollection)
                {
                    if (flag)
                    {
                        AspNetCore.ReportingServices.OnDemandReportRendering.SubReport subReport = item as AspNetCore.ReportingServices.OnDemandReportRendering.SubReport;
                        if (subReport != null && subReport.Report != null && string.CompareOrdinal(item.Name, text) == 0)
                        {
                            reportItem = SelectiveRendering.FindReportItem(subReport.Report, reportItemPathSteps.Skip(1), out reportSection);
                        }
                    }
                    else
                    {
                        AspNetCore.ReportingServices.OnDemandReportRendering.Rectangle rectangle = item as AspNetCore.ReportingServices.OnDemandReportRendering.Rectangle;
                        if (rectangle != null)
                        {
                            reportItem = SelectiveRendering.FindReportItem(rectangle, text);
                        }
                        else if (string.CompareOrdinal(item.Name, text) == 0)
                        {
                            reportItem = item;
                        }
                    }
                    if (reportItem != null)
                    {
                        reportSection = reportSection2;
                        return(reportItem);
                    }
                }
            }
            return(null);
        }
Esempio n. 17
0
 public override void Reset(ReportSection section, int newPageNumber, int newTotalPages, int newOverallPageNumber, int newOverallTotalPages)
 {
     base.Reset(section, newPageNumber, newTotalPages, newOverallPageNumber, newOverallTotalPages);
     this.PageInit();
 }
		private void PageInit(ReportSection section)
		{
			AspNetCore.ReportingServices.ReportProcessing.OnDemandReportObjectModel.ObjectModelImpl reportObjectModel = this.m_processingContext.ReportObjectModel;
			AspNetCore.ReportingServices.ReportProcessing.OnDemandReportObjectModel.AggregatesImpl aggregatesImpl = reportObjectModel.AggregatesImpl;
			Global.Tracer.Assert(section.BodyItemsForHeadFoot != null, "Missing cached BodyItemsForHeadFoot collection");
			Global.Tracer.Assert(section.PageSectionItemsForHeadFoot != null, "Missing cached PageSectionItemsForHeadFoot collection");
			section.BodyItemsForHeadFoot.ResetAll(default(AspNetCore.ReportingServices.RdlExpressions.VariantResult));
			section.PageSectionItemsForHeadFoot.ResetAll();
			reportObjectModel.GlobalsImpl.SetPageNumbers(base.m_currentPageNumber, base.m_totalPages, base.m_currentOverallPageNumber, base.m_overallTotalPages);
			reportObjectModel.GlobalsImpl.SetPageName(base.m_pageName);
			AspNetCore.ReportingServices.ReportIntermediateFormat.Report reportDef = base.m_romReport.ReportDef;
			AspNetCore.ReportingServices.ReportIntermediateFormat.ReportSection sectionDef = section.SectionDef;
			AspNetCore.ReportingServices.ReportIntermediateFormat.Page page = sectionDef.Page;
			section.PageAggregatesOverReportItems = new Dictionary<string, AspNetCore.ReportingServices.ReportProcessing.OnDemandReportObjectModel.AggregatesImpl>();
			this.m_processingContext.ReportObjectModel.ReportItemsImpl.SpecialMode = true;
			if (page.PageAggregates != null)
			{
				for (int i = 0; i < page.PageAggregates.Count; i++)
				{
					AspNetCore.ReportingServices.ReportIntermediateFormat.DataAggregateInfo dataAggregateInfo = page.PageAggregates[i];
					aggregatesImpl.Remove(dataAggregateInfo);
					dataAggregateInfo.ExprHostInitialized = false;
					AspNetCore.ReportingServices.ReportIntermediateFormat.DataAggregateObj dataAggregateObj = new AspNetCore.ReportingServices.ReportIntermediateFormat.DataAggregateObj(dataAggregateInfo, this.m_processingContext);
					object[] array = default(object[]);
					DataFieldStatus dataFieldStatus = default(DataFieldStatus);
					dataAggregateObj.EvaluateParameters(out array, out dataFieldStatus);
					string specialModeIndex = reportObjectModel.ReportItemsImpl.GetSpecialModeIndex();
					if (specialModeIndex == null)
					{
						aggregatesImpl.Add(dataAggregateObj);
					}
					else
					{
						AspNetCore.ReportingServices.ReportProcessing.OnDemandReportObjectModel.AggregatesImpl aggregatesImpl2 = default(AspNetCore.ReportingServices.ReportProcessing.OnDemandReportObjectModel.AggregatesImpl);
						if (!section.PageAggregatesOverReportItems.TryGetValue(specialModeIndex, out aggregatesImpl2))
						{
							aggregatesImpl2 = new AspNetCore.ReportingServices.ReportProcessing.OnDemandReportObjectModel.AggregatesImpl(this.m_processingContext);
							section.PageAggregatesOverReportItems.Add(specialModeIndex, aggregatesImpl2);
						}
						aggregatesImpl2.Add(dataAggregateObj);
						this.m_reportItemToReportSection[specialModeIndex] = section;
					}
					dataAggregateObj.Init();
				}
			}
			reportObjectModel.ReportItemsImpl.SpecialMode = false;
			AspNetCore.ReportingServices.ReportIntermediateFormat.PageSection rifObject = null;
			IReportScopeInstance romInstance = null;
			if (sectionDef.Page.PageHeader != null)
			{
				rifObject = sectionDef.Page.PageHeader;
				romInstance = section.Page.PageHeader.Instance.ReportScopeInstance;
				section.Page.PageHeader.SetNewContext();
			}
			if (sectionDef.Page.PageFooter != null)
			{
				rifObject = sectionDef.Page.PageFooter;
				romInstance = section.Page.PageFooter.Instance.ReportScopeInstance;
				section.Page.PageFooter.SetNewContext();
			}
			if (sectionDef != null)
			{
				this.m_processingContext.SetupContext(rifObject, romInstance);
			}
		}