PageFooterBand.cs 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. using System;
  2. using System.Collections;
  3. using System.ComponentModel;
  4. using FastReport.Utils;
  5. namespace FastReport
  6. {
  7. /// <summary>
  8. /// Represents a page footer band.
  9. /// </summary>
  10. public class PageFooterBand : BandBase
  11. {
  12. #region Properties
  13. /// <summary>
  14. /// This property is not relevant to this class.
  15. /// </summary>
  16. [Browsable(false)]
  17. public new bool StartNewPage
  18. {
  19. get { return base.StartNewPage; }
  20. set { base.StartNewPage = value; }
  21. }
  22. /// <summary>
  23. /// This property is not relevant to this class.
  24. /// </summary>
  25. [Browsable(false)]
  26. public new bool PrintOnBottom
  27. {
  28. get { return base.PrintOnBottom; }
  29. set { base.PrintOnBottom = value; }
  30. }
  31. #endregion
  32. /// <inheritdoc/>
  33. public override void InitializeComponent()
  34. {
  35. base.InitializeComponent();
  36. // SubreportObject on a pagefooter will produce StackOverflow exception. Set PrintOnParent flag to avoid this
  37. foreach (ReportComponentBase obj in Objects)
  38. {
  39. if (obj is SubreportObject)
  40. (obj as SubreportObject).PrintOnParent = true;
  41. }
  42. }
  43. /// <summary>
  44. /// Initializes a new instance of the <see cref="PageFooterBand"/> class with default settings.
  45. /// </summary>
  46. public PageFooterBand()
  47. {
  48. FlagUseStartNewPage = false;
  49. }
  50. }
  51. }