Group in page header

I am creating a spreadsheet with the data grouped by a field and displaying it on screen using the TFlexCelPreviewer.

The groups are showing up correctly, but when a page break occurs I want the currently active group to be displayed again along after the page header.

How can I do this? I tried to put the group line in the header, but the TFlexCelPreviewer displays the data for the first group found.

Is it possible to do that?

Hi,
TFlexCelPreviewer should work exactly the same as Excel's "print preview". So whatever you can do in Excel you can see it with TFlexCelPreviewer, but you have the same limitations too.
Sadly I don't think there is a direct way to do what you want, but here are some ideas that might work in your case.

  1. FlexCel has "Intelligent page breaks": FlexCel API Developer Guide | FlexCel Studio for VCL and FireMonkey documentation (or if you are using reports: FlexCel Reports Designer Guide | FlexCel Studio for VCL and FireMonkey documentation )
    This will not help you repeating a row when a page break occurs, but it can help you putting different groups in different pages, so there won't be that much need to continue the group in another page, since all groups start at the beginning of the page. For an example of this, look at the report: Range reports (Delphi) | FlexCel Studio for VCL and FireMonkey documentation in the CustomPreview demo.

  2. If each group should start in a new page always, another option is to put every group in a different sheet, then preview all sheets. This way, you can put a "Rows to repeat at top" ( see FlexCel API Developer Guide | FlexCel Studio for VCL and FireMonkey documentation ) different for every group, and say group 3 will be in sheet 3, and if the group goes to a second page you can repeat the "group 3 header" in the second (and next) pages.

  3. Finally, the most complex option but the one that might get you nearest to what you want is to manually create add the headers in the correct place. You can see an example by custom-previewing the results of the demo Splitting datasets (Delphi) | FlexCel Studio for VCL and FireMonkey documentation