Row count

edited 2:33PM 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 2:33PM
    Hello,

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

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

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

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

    Thanks
  • edited 2:33PM
    Here it is in .txt format. After downloading, rename to .frx

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.