TfrxGroupHeader StartNewPage Bug
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.
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
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]