예제 #1
0
		public static ExporterPage CreateInstance (SectionBounds sectionBounds,int pageNumber)
		{
			if (sectionBounds == null) {
				throw new ArgumentNullException("sectionBounds");
			}
			ExporterPage instance = new ExporterPage(sectionBounds,pageNumber);
			return instance;
		}
예제 #2
0
		public static SinglePage CreateSinglePage ()
		{
			SectionBounds sb = new SectionBounds(new ReportSettings(),false);
			SinglePage p = new SinglePage(sb,15);
		
			p.TotalPages = 25;
			p.ReportName = "SharpTestReport.srd";
			p.ReportFileName =@"c:\testreports\SharpTestReport.srd";
			p.ExecutionTime = new DateTime(2009,12,24,23,59,59);
			return p;
		}
예제 #3
0
		public SinglePage(SectionBounds sectionBounds, int pageNumber):base(pageNumber)
			
		{
			if (sectionBounds == null) {
				throw new ArgumentNullException("sectionBounds");
			}
			if (pageNumber < 0) {
				throw new ArgumentNullException("pageNumber");
			}
			this.sectionBounds = sectionBounds;
			this.PageNumber = pageNumber;
		}
예제 #4
0
		protected ExporterPage InitNewPage ()
		{
			bool firstPage;
			this.ReportModel.ReportSettings.LeftMargin = this.ReportModel.ReportSettings.LeftMargin;
			if (this.Pages.Count == 0) {
				firstPage = true;
			} else {
				firstPage = false;
			}
			SectionBounds sectionBounds  = new SectionBounds (this.ReportModel.ReportSettings,firstPage);
			ExporterPage sp = ExporterPage.CreateInstance(sectionBounds,this.pages.Count + 1);
			return sp;
		}
예제 #5
0
        public SinglePage(SectionBounds sectionBounds, int pageNumber) : base(pageNumber)

        {
            if (sectionBounds == null)
            {
                throw new ArgumentNullException("sectionBounds");
            }
            if (pageNumber < 0)
            {
                throw new ArgumentNullException("pageNumber");
            }
            this.sectionBounds = sectionBounds;
            this.PageNumber    = pageNumber;
        }
예제 #6
0
		public BaseConverter(IDataNavigator dataNavigator,ExporterPage singlePage,
		                     ILayouter layouter)
		{
			if (dataNavigator == null) {
				throw new ArgumentNullException("dataNavigator");
			}
			if (singlePage == null) {
				throw new ArgumentNullException("singlePage");
			}

			if (layouter == null) {
				throw new ArgumentNullException("layouter");
			}
			this.singlePage = singlePage;
			this.dataNavigator = dataNavigator;
			this.sectionBounds = this.singlePage.SectionBounds;
			this.layouter = layouter;
			this.evaluator = StandardPrinter.CreateEvaluator(this.singlePage,this.dataNavigator);
		}
예제 #7
0
		protected void InitNewPage ()
		{
			bool firstPage;
			
			if (this.Pages.Count == 0) {
				firstPage = true;
			} else {
				firstPage = false;
			}
			
			this.ReportModel.ReportSettings.LeftMargin = this.ReportModel.ReportSettings.LeftMargin;
			var sectionBounds  = new SectionBounds (this.ReportModel.ReportSettings,firstPage);
			
			this.SinglePage = ExporterPage.CreateInstance(sectionBounds,this.pages.Count + 1);
			
			if (this.EvaluatorFacade == null)
			{
				EvaluatorFacade = EvaluationHelper.CreateEvaluator(SinglePage,SinglePage.IDataNavigator);
			}
			EvaluatorFacade.SinglePage = this.SinglePage;
		}
예제 #8
0
		public void Calculate_Page_If_Firstpage ()
		{
			Size defSize = new Size (727,60);
			IReportModel model = ReportModel.Create();
			model.ReportHeader.Size = defSize;
			model.ReportHeader.Location = new Point(50,50);
			
			
			model.PageHeader.Size = defSize;
			model.PageHeader.Location = new Point(50,125);
			
			model.DetailSection.Size = defSize;
			model.DetailSection.Location = new Point(50,200);
			
			model.PageFooter.Size = defSize;
			model.ReportFooter.Location = new Point(50,275);
			
			model.ReportFooter.Size = defSize;
			model.ReportFooter.Location = new Point(50,350);
			
			var  s = new SectionBounds(new ReportSettings(),true);
			SinglePage sp = new SinglePage(s,0);
			
			sp.CalculatePageBounds(model);
			Console.WriteLine();
			Console.WriteLine("ReportHeader {0} - {1}",sp.SectionBounds.ReportHeaderRectangle,sp.SectionBounds.ReportHeaderRectangle.Location.Y + sp.SectionBounds.ReportHeaderRectangle.Height);
			Console.WriteLine("PageHeader {0} - {1}",sp.SectionBounds.PageHeaderRectangle,sp.SectionBounds.PageHeaderRectangle.Location.Y +sp.SectionBounds.PageHeaderRectangle.Height );
			Console.WriteLine("DetailSection {0} - {1} ",sp.SectionBounds.DetailSectionRectangle,sp.SectionBounds.DetailSectionRectangle.Location.Y + sp.SectionBounds.DetailSectionRectangle.Height);
			
			Console.WriteLine("\tDetailStart {0} ",sp.SectionBounds.DetailStart);
			Console.WriteLine("\tDetailEnd {0} ",sp.SectionBounds.DetailEnds);
			Console.WriteLine("\tDetailArea {0} ",sp.SectionBounds.DetailArea);
			Console.WriteLine("PageFooter {0} - {1} ",sp.SectionBounds.PageFooterRectangle,sp.SectionBounds.PageFooterRectangle.Location.Y + sp.SectionBounds.PageFooterRectangle.Height);
			Console.WriteLine("ReportFooter {0} - {1}",sp.SectionBounds.ReportFooterRectangle,sp.SectionBounds.ReportFooterRectangle.Location.Y + sp.SectionBounds.ReportFooterRectangle.Height);
	Console.WriteLine();
		}
예제 #9
0
		public void Init()
		{
			this.sectionBounds = new SectionBounds(new ReportSettings(),false);
		}
예제 #10
0
		ISinglePage CreateSinglePage(IReportModel model,int pageNumber)
		{
			Size defaultSectionSize = new Size (727,60);
			var  s = new SectionBounds(model.ReportSettings,true);
			
			SinglePage sp = new SinglePage(s,0);
			sp.CalculatePageBounds(model);
			return sp;
		}
예제 #11
0
		public NewPageEventArgs(ExporterCollection itemsList,SectionBounds sectionBounds)
		{
			this.itemsList = itemsList;
			SectionBounds = sectionBounds;
		}
예제 #12
0
		private ExporterPage (SectionBounds sectionBounds,int pageNumber):base(sectionBounds,pageNumber)
		{	
		}