GroupHeader problem in a report
Hello [img]style_emoticons/<#EMO_DIR#>/wink.gif" style="vertical-align:middle" emoid=";)" border="0" alt="wink.gif" />
I have a problem with my GroupHeader in my report.
Here is the situation: I display several groups of items (e.g. furniture, worktop, accessories... from my GroupHeader). In my GH, I have the name of the Group, and several informations like position, quantity, price, description...
When my previous Group finish just before the end of the page, the next group is print at the bottom without the items (because there is no place) and he is reprint on the next page (My settings on the GH => Strech / Reprint on new page). I also try with the setting Do not separate on the GH, he moved at the next page, but for one group on several pages, the GH is not reprint at the top...I don't know why.
I've try to remove the GH if GH.Top > Page.PaperHeight - GH.Height but it don't work...
I should create which event on my GH ? OnBeforePrint ? OnAfterCalcHeight ? ...
How can I hide or remove this part at the bottom of the page in this case ??
I do not find any solution, so Thank you for your help[/img]
Comments
With this setting, the GroupHeader move to the next page (like I want) but for one group on several pages, the GroupHeader is not reprint at the top...I don't know why.
also what version and build no of fr are you using.
And when my first group for example have their items on 3 pages, the GroupHeader (GroupName , Position, Quantity, Description...) is not reprint at each page and I don't understand this (Reprint on new page is already activate)
The FastReport version is 4.9.
fr4.9.121 and see if your problem still exixsts.
current version :
- fixed bug wit TfrxHeader.ReprintOnNewpage and KeepTogether
I hope this fix is the solution [img]style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /> Thank you[/img]
So, I changed my code on the GroupHeader , but I get an error (stack overflow), I don't know why ??
Here is my code :
if(engine.FreeSpace < (GroupHeader.Top + GroupHeader.Height) + (MasterData.Top + MasterData.Height)) then
engine.NewPage;
What is false in this code ?
the top prop value of the band is what is causing your problem it is not needed
(When I tried with the engine.FreeSpace, I get an error but my report is correctly displayed.
engine.NewPage;
I think I will use this solution for the moment. Thank you