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]> (See screenshot)sanstitresc.jpg
sanstitre1rq.jpg

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 7:00AM
    have you tried setting the keeptogether prop of the group header
  • edited 7:00AM
    Yes, I try with "Keep Together" on the GroupHeader, and "Keep Header Together" on the Masterdata.

    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.
  • gordkgordk St.Catherines On. Canada.
    edited 7:00AM
    what is differnt about that group compared to the others.
    also what version and build no of fr are you using.
  • edited 7:00AM
    The difference is only the items, it's not the same GroupNr (each GroupNr for each GroupHeader), but it's the same layout.
    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.
  • gordkgordk St.Catherines On. Canada.
    edited 7:00AM
    i suggest you go to your dl page and try the latest daily build
    fr4.9.121 and see if your problem still exixsts.
  • edited 7:00AM
    I do not saw the new version.

    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]>
  • edited 7:00AM
    Today I try with the new Fastreport version (4.9.122) but my problem is always here [img]style_emoticons/<#EMO_DIR#>/sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" /> I don't find an solutions.[/img]
  • edited September 2010
    I saw in the forum a topic with my problem ( Here)

    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 ?
  • gordkgordk St.Catherines On. Canada.
    edited 7:00AM
    you did not pay attention to what was written in the topic you referenced.
    the top prop value of the band is what is causing your problem it is not needed
  • edited 7:00AM
    Sorry, but I don't understand you. What do you mean exactly by your last sentence ? Maybe it's a misunderstanding between us :/

    (When I tried with the engine.FreeSpace, I get an error but my report is correctly displayed.
  • gordkgordk St.Catherines On. Canada.
    edited 7:00AM
    if engine.FreeSpace < (GroupHeader.Height + MasterData.Height) then
    engine.NewPage;
  • edited 7:00AM
    OK, I tried with your code, it's correct in my report except for specific cases. It depend of the lenght of my items. This is the reason why I tested with (GroupHeader.Top + GroupHeader.Height) + (MasterData.Top + MasterData.Height).

    I think I will use this solution for the moment. Thank you

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.