Row count

edited 10:44PM 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 10:44PM
    Hello,

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

    this solution does not work if I have the databand with 'CanGrow = True'
  • edited 10:44PM
    Hello,

    Try AfterLayout event instead of BeforePrint.
  • edited 10:44PM
    Sorry but does not work correctly.

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

    Thanks
  • edited 10:44PM
    Here it is in .txt format. After downloading, rename to .frx
    1.txt 4.7K

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.