TfrxGroupHeader StartNewPage Bug

edited 12:14PM in FastReport VCL 5
Hi,

I found a bug while using GroupHeaders and the StartNewPage property. It seems that StartNewPage=True does not always work on a GroupHeader if there is another GroupHeader above it.

Example 1

Data
ClientID,ClientName,ClientState
001,Jane,California
002,John,California
003,George,Texas

Page
GroupHeaderState (Condition = Dataset1."ClientState")
GroupHeaderClient (Condition = Dataset1."ClientID" / StartNewPage = True)
MasterDataClient

Expected Result
-- Page 1 --
California GroupHeaderState
Jane GroupHeaderClient
Jane MasterDataClient
-- Page 2 --
John GroupHeaderClient
John MasterDataClient
-- Page 3 --
Texas GroupHeaderState
George GroupHeaderClient
George MasterDataClient

Actual Result
-- Page 1 --
California GroupHeaderState
Jane GroupHeaderClient
Jane MasterDataClient
-- Page 2 --
John GroupHeaderClient
John MasterDataClient
Texas GroupHeaderState
George GroupHeaderClient
George MasterDataClient

Remarks
Changing "GroupHeaderState.StartNewPage = True" give the expected result.

Example 2 (Different bug)

Data
ClientID,ClientName,ClientState
001,Jane,California
002,John,California
003,George,Texas

Page
GroupHeaderState (Condition = Dataset1."ClientState" / Visible = False)
GroupHeaderClient (Condition = Dataset1."ClientID" / StartNewPage = True)
MasterDataClient

Expected Result
-- Page 1 --
Jane GroupHeaderClient
Jane MasterDataClient
-- Page 2 --
John GroupHeaderClient
John MasterDataClient
-- Page 3 --
George GroupHeaderClient
George MasterDataClient

Actual Result
-- Page 1 --
Jane GroupHeaderClient
Jane MasterDataClient
-- Page 2 --
John GroupHeaderClient
John MasterDataClient
George GroupHeaderClient
George MasterDataClient

Remarks
I found that the GroupHeaderClient.StartNewPage work only if GroupHeaderState.Condition does not change. Changing "GroupHeaderState.Condition = 0" (or any value that doesn't change) fix the StartNewPage.

Conclusion
The example #2 is the bug that I would like to be fixed because I give the possibility to my user to hide the GroupHeaderState just before the report is printed. I will use the work around, but it would be nice if it could be fixed in a future release.

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 12:14PM
    When using nested groups you must have the order by clause of the query supplying the data in the same order as the headers
    fr does not sort for you
  • edited 12:14PM
    gordk wrote: »
    When using nested groups you must have the order by clause of the query supplying the data in the same order as the headers
    fr does not sort for you

    Hi,

    Thanks for your answer. [img]style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /> If you take a look at my data, it is already sorted by "ClientState" and "ClientID"(the same order of my nested GroupHeader). I think my "Example 2" should be working without the need to patch the condition on the invisible GroupHeader.[/img]

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.