Ejemplo n.º 1
0
        private void PushPrinting(object sender, SectionRenderEventArgs e)
        {
//			string sectionName = e.Section.Name;

            /*
             * if (sectionName == ReportSectionNames.ReportHeader) {
             *      Console.WriteLine("PushPrinting  :" + ReportSectionNames.ReportHeader);
             * }
             *
             * else if (sectionName == ReportSectionNames.ReportPageHeader) {
             *      Console.WriteLine("PushPrinting :" +ReportSectionNames .ReportPageHeader);
             * }
             *
             * else if (sectionName == ReportSectionNames.ReportDetail){
             *      Console.WriteLine("PushPrinting :" + ReportSectionNames.ReportDetail);
             * }
             *
             * else if (sectionName == ReportSectionNames.ReportPageFooter){
             *      Console.WriteLine("PushPrinting :" + ReportSectionNames.ReportPageFooter);
             * }
             *
             * else if (sectionName == ReportSectionNames.ReportFooter){
             *      Console.WriteLine("PushPrinting :" + ReportSectionNames.ReportFooter);
             * }
             *
             * else{
             *      throw new WrongSectionException(sectionName);
             * }
             */
        }
Ejemplo n.º 2
0
        private void PushPrinting(object sender, SectionRenderEventArgs e)
        {
            EventHelper.Raise <SectionRenderEventArgs>(SectionRendering, this, e);
            string sectionName = e.Section.Name;

            if (sectionName == ReportSectionNames.ReportHeader)
            {
                Console.WriteLine("xx  " + ReportSectionNames.ReportHeader);
            }

            else if (sectionName == ReportSectionNames.ReportPageHeader)
            {
                Console.WriteLine("xx " + ReportSectionNames.ReportPageHeader);
            }

            else if (sectionName == ReportSectionNames.ReportDetail)
            {
                Console.WriteLine("xx " + ReportSectionNames.ReportDetail);
            }

            else if (sectionName == ReportSectionNames.ReportPageFooter)
            {
                Console.WriteLine("xx " + ReportSectionNames.ReportPageFooter);
            }

            else if (sectionName == ReportSectionNames.ReportFooter)
            {
                Console.WriteLine("xx " + ReportSectionNames.ReportFooter);
            }

            else
            {
                throw new WrongSectionException(sectionName);
            }
        }
Ejemplo n.º 3
0
		protected void FireSectionRendering (BaseSection section)
		{
			SectionRenderEventArgs srea = new SectionRenderEventArgs(section,
			                                                         this.SinglePage.PageNumber,
			                                                         this.dataNavigator.CurrentRow,
			                                                         section);
			EventHelper.Raise<SectionRenderEventArgs>(SectionRendering,this,srea);
		}
Ejemplo n.º 4
0
		protected void FireSectionRendering (BaseSection section)
		{
			SectionRenderEventArgs srea = new SectionRenderEventArgs(section,
			                                                         this.SinglePage.PageNumber,
			                                                         this.DataNavigator.CurrentRow,
			                                                         section);
			EventHelper.Raise<SectionRenderEventArgs>(SectionRendering,this,srea);
		}
Ejemplo n.º 5
0
        protected void FireSectionRenderEvent(BaseSection section, int currentRow)
        {
            SectionRenderEventArgs ea =
                new SectionRenderEventArgs(section,
                                           pages.Count,
                                           currentRow,
                                           section);

            EventHelper.Raise <SectionRenderEventArgs>(SectionRendering, this, ea);
        }
Ejemplo n.º 6
0
		protected void FireSectionRenderEvent (BaseSection section,int currentRow)
		{
			SectionRenderEventArgs ea =
				new SectionRenderEventArgs(section,
				                           pages.Count,
				                           currentRow,
				                           section);
			
			EventHelper.Raise<SectionRenderEventArgs>(SectionRendering,this,ea);
		}
Ejemplo n.º 7
0
		void OnSectionRendering (object sender,SectionRenderEventArgs e)
		{
			base.FireSectionRenderEvent(e.Section,e.RowNumber);
		}
Ejemplo n.º 8
0
		private void PushPrinting (object sender,SectionRenderEventArgs e)
		{
//			string sectionName = e.Section.Name;
			/*
			if (sectionName == ReportSectionNames.ReportHeader) {
				Console.WriteLine("PushPrinting  :" + ReportSectionNames.ReportHeader);
			} 
			
			else if (sectionName == ReportSectionNames.ReportPageHeader) {
				Console.WriteLine("PushPrinting :" +ReportSectionNames .ReportPageHeader);
			} 
			
			else if (sectionName == ReportSectionNames.ReportDetail){
				Console.WriteLine("PushPrinting :" + ReportSectionNames.ReportDetail);
			}
			
			else if (sectionName == ReportSectionNames.ReportPageFooter){
				Console.WriteLine("PushPrinting :" + ReportSectionNames.ReportPageFooter);
			}
			
			else if (sectionName == ReportSectionNames.ReportFooter){
				Console.WriteLine("PushPrinting :" + ReportSectionNames.ReportFooter);
			}
			
			else{
				throw new WrongSectionException(sectionName);
			}
			*/
		}
Ejemplo n.º 9
0
 void OnSectionRendering(object sender, SectionRenderEventArgs e)
 {
     base.FireSectionRenderEvent(e.Section, e.RowNumber);
 }
Ejemplo n.º 10
0
/*
		private void OnPageCreated(object sender, PageCreatedEventArgs e)
		{
			if (this.Pages.Count == 1) {
				ShowSelectedPage();
				this.pageNumber = 0;
			}

		}
*/


		private void PushPrinting(object sender, SectionRenderEventArgs e)
		{
//			string sectionName = e.Section.Name;
		}
Ejemplo n.º 11
0
		private void PushPrinting (object sender, SectionRenderEventArgs e ) {
			EventHelper.Raise<SectionRenderEventArgs>(SectionRendering,this,e);
		}
Ejemplo n.º 12
0
/*
 *              private void OnPageCreated(object sender, PageCreatedEventArgs e)
 *              {
 *                      if (this.Pages.Count == 1) {
 *                              ShowSelectedPage();
 *                              this.pageNumber = 0;
 *                      }
 *
 *              }
 */


        private void PushPrinting(object sender, SectionRenderEventArgs e)
        {
//			string sectionName = e.Section.Name;
        }
Ejemplo n.º 13
0
        private void PushPrinting(object sender, SectionRenderEventArgs e)
        {
            string sectionName = e.Section.Name;

            if (sectionName == ReportSectionNames.ReportHeader)
            {
                Console.WriteLine("PushPrinting  :" + ReportSectionNames.ReportHeader);
            }

            else if (sectionName == ReportSectionNames.ReportPageHeader)
            {
                Console.WriteLine("PushPrinting :" + ReportSectionNames.ReportPageHeader);
            }

            else if (sectionName == ReportSectionNames.ReportDetail)
            {
                Console.WriteLine("PushPrinting :" + ReportSectionNames.ReportDetail);
                // TimeWritten
                BaseDataItem time = e.Section.FindItem("BaseDataItem1") as BaseDataItem;
                if (time != null)
                {
                    DateTime dateTime = Convert.ToDateTime(time.DBValue);

                    int newhour = dateTime.Hour;
                    if (hour != newhour)
                    {
                        hour = newhour;
//						e.Section.Items[0].DrawBorder = true;
                        e.Section.Items[0].FrameColor = Color.Black;
//						e.Section.Items[0].BackColor = Color.LightGray;
                        time.DBValue          = dateTime.Hour.ToString();
                        time.ContentAlignment = ContentAlignment.MiddleLeft;
                    }
                    else
                    {
//						time.DrawBorder = false;
                        e.Section.Items[0].FrameColor = Color.White;
//						e.Section.Items[0].BackColor = Color.White;
                        time.DBValue          = dateTime.Minute.ToString() + ":" + dateTime.Second.ToString();
                        time.ContentAlignment = ContentAlignment.MiddleRight;
                    }
                }
//				D:\SharpDevelop3.0_WorkingCopy\SharpDevelop\samples\SharpDevelopReports\SampleReports\EventLogger\Error.png
                //  Image
                BaseDataItem dataItem = e.Section.FindItem("EntryType") as BaseDataItem;
                if (dataItem != null)
                {
                    string str   = dataItem.DBValue;
                    Image  image = null;
                    if (str == "Information")
                    {
                        image = this.imageList.Images[1];
                    }
                    else if (str == "Warning")
                    {
                        image = this.imageList.Images[2];
                    }
                    else if (str == "Error")
                    {
                        image = this.imageList.Images[0];
                    }

                    if (image != null)
                    {
                        BaseImageItem imageItem = e.Section.FindItem("BaseImageItem1") as BaseImageItem;
                        if (imageItem != null)
                        {
                            imageItem.Image = image;
                        }
                    }
                }
            }

            else if (sectionName == ReportSectionNames.ReportPageFooter)
            {
                Console.WriteLine("PushPrinting :" + ReportSectionNames.ReportPageFooter);
            }

            else if (sectionName == ReportSectionNames.ReportFooter)
            {
                Console.WriteLine("PushPrinting :" + ReportSectionNames.ReportFooter);
            }

            else
            {
                throw new WrongSectionException(sectionName);
            }
        }
Ejemplo n.º 14
0
		void OnSectionRendering (object sender,SectionRenderEventArgs e)
		{
//			Console.WriteLine("Datapagebuilder : OnSectionRendering");
			base.FireSectionRenderEvent(e.Section,e.RowNumber);
		}
Ejemplo n.º 15
0
		private void PushPrinting (object sender, SectionRenderEventArgs e ) {
			EventHelper.Raise<SectionRenderEventArgs>(SectionRendering,this,e);
			string sectionName = e.Section.Name;
			
			if (sectionName == ReportSectionNames.ReportHeader) {
				Console.WriteLine("xx  " + ReportSectionNames.ReportHeader);
			} 
			
			else if (sectionName == ReportSectionNames.ReportPageHeader) {
				Console.WriteLine("xx " +ReportSectionNames .ReportPageHeader);
			} 
			
			else if (sectionName == ReportSectionNames.ReportDetail){
				Console.WriteLine("xx " + ReportSectionNames.ReportDetail);
			}
			
			else if (sectionName == ReportSectionNames.ReportPageFooter){
				Console.WriteLine("xx " + ReportSectionNames.ReportPageFooter);
			}
			
			else if (sectionName == ReportSectionNames.ReportFooter){
				Console.WriteLine("xx " + ReportSectionNames.ReportFooter);
			}
			
			else{
				throw new WrongSectionException(sectionName);
			}
		}