GroupFooter Height

FAlvaradoFAlvarado US/Mexico
edited 4:09AM in FastReport VCL 5
Hi all:
How can I set the height of the group footer in code to accommodate only the visible items?
this procedure works and set visible the memos:
procedure frxDBDataset1SubContractor1OnBeforePrint(Sender: TfrxComponent);
begin
frxDBDataset1SubContractor1.Visible := Length(<frxDBDataset1."SubContractor1">) > 0;
frxDBDataset1SubContractor2.Visible := Length(<frxDBDataset1."SubContractor2">) > 0;
...
end;

.. but this is not working!
procedure GroupFooter1OnAfterPrint (Sender: TfrxComponent);
begin
GroupFooter1.Height := 0.90;
if frxDBDataset1SubContractor1.Visible then
GroupFooter1.Height := GroupFooter1.Height + 0.20;
if frxDBDataset1SubContractor2.Visible then
GroupFooter1.Height := GroupFooter1.Height + 0.20;
...
end;

OnAfterCalcHeight and OnBeforePtint events don't work either...
Any suggestions?
Best Regards
Francisco Alvarado

Comments

  • edited 4:09AM
    Good morning,

    try something like this in OnBeforePrint:
    if tfrxmemoview(sender.parent.findobject('frxDBDataset1SubContractor1')).visible then
    

    greetz
  • FAlvaradoFAlvarado US/Mexico
    edited 4:09AM
    Good morning,

    try something like this in OnBeforePrint:
    if tfrxmemoview(sender.parent.findobject('frxDBDataset1SubContractor1')).visible then
    

    greetz
    I tried that but the GroupFooter is overlapped by the next section (GroupHeader).
    Thank you
    Francisco Alvarado
  • gordkgordk St.Catherines On. Canada.
    edited 4:09AM
    try this attach a child band to the group footer place the memos you want hide in the child band
    write coden to hide the child band
  • FAlvaradoFAlvarado US/Mexico
    edited 4:09AM
    gordk wrote: »
    try this attach a child band to the group footer place the memos you want hide in the child band
    write coden to hide the child band
    Thank you! That worked!
    Francisco Alvarado

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.