[Solved] Lazreport - How to really make duplicates disappear lazarus / 64-FPC development ---------------------------------------------------------------------- janhsh · 2024-08-06 01:35 Hello I have a problem with lazreport I created a "Master data" band with a field A, and a child band with a field B. Both fields are in the same dataset My display is as follows A Value 1B value 1.1 A Value 1B value 1.2 A Value 1B value 1.3 A Value 2B value 2.1 A Value 2B value 2.2 When I set HideDuplicates=True, the display becomes A Value 1B value 1.1(Blank line)B value 1.2(Blank line)B value 1.3 A Value 2B value 2.1(Blank line)B value 2.2                            I would like to make these white lines disappear to obtain A Value 1B value 1.1B value 1.2B value 1.3 A Value 2B value 2.1B value 2.2          I tried with a script to reduce the size of the "Master data" band when the A field is not visible, but it doesn't work How can I do this? ---------------------------------------------------------------------- GAN · 2024-08-06 02:16 Hello, I had similar issue and I solved using the event handler frRepBeginBand, there i can manage the heigth of the band. May be this help you. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TFLibCompras.frRepBeginBand(Band: TfrBand);begin  if ((Band.Name='MasterData1') and (ZQ.FieldByName('cnetogravado2').AsCurrency<>0)) then  begin    Band.Height:=45;    Exit;  end;  if ((Band.Name='MasterData1') and (ZQ.FieldByName('cnetogravado1').AsCurrency<>0)) then  begin    Band.Height:=30;    Exit;  end;  if ((Band.Name='MasterData1') and (ZQ.FieldByName('cnetogravado1').AsCurrency=0)) then  begin    Band.Height:=14;    Exit;  end;end; ---------------------------------------------------------------------- paweld · 2024-08-06 04:46 use grouping. to the report you add a Master data band with a field with value B, add a Group header band with a condition for value A, and on this band you put a field with value A. Sample in attachment. ---------------------------------------------------------------------- janhsh · 2024-08-06 23:08 For layout reasons, I placed this part in a subreport. Grouping does not seem to work with a subreport.