Row count

edited 4:00AM in FastReport .NET
Hello,
I have a problem with the row count.

I need to number the rows in a page, restarting from 1 in the next page.
In which event I reset the counter?
I tried on PageHeader_BeforeLayout and PageHeader_BeforePrint but the row count restart from second row.


Thanks.

Comments

  • edited 4:00AM
    Hello,

    You need to do this in the databand.BeforePrint event:
    if (Engine.FreeSpace < Data1.Height)
    {
      // reset the counter here
    }
    
  • edited 4:00AM
    Hi,

    this solution does not work if I have the databand with 'CanGrow = True'
  • edited 4:00AM
    Hello,

    Try AfterLayout event instead of BeforePrint.
  • edited 4:00AM
    Sorry but does not work correctly.

    Thanks
  • edited 4:00AM
    Here is the modified "Simple List" report, you may open it in Demo.exe.
    1.zip 1.5K
  • edited 4:00AM
    Sorry but I have a problem with zip: 'Unexpected end of archive'

    Thanks
  • edited 4:00AM
    Here it is in .txt format. After downloading, rename to .frx
    1.txt 4.7K

Leave a Comment