Row count

edited 5:24AM 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 5:24AM
    Hello,

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

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

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

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

    Thanks
  • edited 5:24AM
    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.