示例#1
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;
		}
示例#2
0
		public void Init()
		{
		
			this.singlePage = TestHelper.CreateSinglePage();
			this.evaluator = new ExpressionEvaluatorFacade(this.singlePage);
			AggregateFuctionHelper ah = new AggregateFuctionHelper();
			this.testTable = ah.AggregateTable;
			
			
			this.dataManager = ICSharpCode.Reports.Core.DataManager.CreateInstance(this.testTable, new ReportSettings());
			this.singlePage.IDataNavigator = this.dataManager.GetNavigator;
		}
示例#3
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();
		}
示例#4
0
		public void ConstrThrowIfPageNumberLessThenZero()
		{
			SinglePage p = new SinglePage(this.sectionBounds,-1);
		}
示例#5
0
		public void ConstrThrowIfNullSectionBounds()
		{
			SinglePage p = new SinglePage(null,15);
		}
示例#6
0
		public void SinglePage_Should_Return_PageNumber()
		{
			SinglePage p = new SinglePage(sectionBounds,15);
			Assert.AreEqual(15,p.PageNumber);
		}
示例#7
0
		public void Can_Create_SinglePage()
		{
			SinglePage p = new SinglePage(sectionBounds,15);
			Assert.IsNotNull(p);
		}
示例#8
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;
		}
		public void Init()
		{
			this.singlePage = TestHelper.CreateSinglePage();
			this.evaluator = new ExpressionEvaluatorFacade(this.singlePage);

			AggregateFuctionHelper ah = new AggregateFuctionHelper();
			this.testTable = ah.AggregateTable;
			
			foreach (DataRow r in this.testTable.Rows)
			{
				this.intResult = this.intResult + Convert.ToInt16(r["IntValue"]);
				this.doubleResult = this.doubleResult + Convert.ToDouble(r["Amount"]);
			}
			
			this.dataManager = ICSharpCode.Reports.Core.DataManager.CreateInstance(this.testTable, new ReportSettings());
			this.singlePage.IDataNavigator = this.dataManager.GetNavigator;
		}
示例#10
0
		public void Init()
		{
			this.singlePage = TestHelper.CreateSinglePage();
			this.evaluator = new ExpressionEvaluatorFacade(this.singlePage);
//			this.evaluator.SinglePage = this.singlePage;
		}
		public void Init()
		{
			
			this.singlePage = TestHelper.CreateSinglePage();
			this.evaluator = new ExpressionEvaluatorFacade(this.singlePage);

			
			AggregateFuctionHelper ah = new AggregateFuctionHelper();
			this.aggregateCollection = ah.AggregateCollection;
			
			foreach (Aggregate r in this.aggregateCollection)
			{
				this.intResult = this.intResult + r.IntValue;
				this.doubleResult = this.doubleResult + r.Amount;
			}
			
			this.dataManager = ICSharpCode.Reports.Core.DataManager.CreateInstance(this.aggregateCollection, new ReportSettings());
			this.singlePage.IDataNavigator = this.dataManager.GetNavigator;
		}