MasterData Stretched= true forces page break after every line

edited 6:14AM in FastReport 4.0
I'm using FMX 2 (version 2.5.11) with Delphi 10.2 with Update 2. I have a text object on my MasterData band that can have a variable number of lines. I set the text object stretchmode = smactualheight and Allowsplit = false. I'm using the onbeforeprint event to determine how many lines should appear. If I set the MasterData band to stretched = true, whether one line or two lines to print a page break always occurs. If MasterData band to stretched = false, the lines will bunch up on the page. See attached examples. Here is my code:

procedure Descrip1OnBeforePrint(Sender: TfrxComponent);
var
s : string;
begin
s := '';
if <Tmptrans."B_SESCHARGE"> <> 0 then
begin
if (length(<Tmptrans."B_SERVLINE1">) > 0) then
s := formatServLine(<Tmptrans."B_SERVLINE1">);
if (<tmptrans."B_SESDATEBILLED"> <> 0) and Validdate(<tmptrans."B_SESDATEBILLED">) then
begin
if Carriers.Locate('CAR_NUMBER',<tmptrans."B_CARRIER">, 0) then
s := s+#13#10 +' Claim Submitted To: '+<Carriers."CAR_NAME">
end;
Descrip1.Text := s
end
else
if <Tmptrans."B_SESRECVD"> <> 0 then
Descrip1.Text := 'PAYMENT'
else
Descrip1.Text := 'ADJUSTMENT'
end;

Any help greatly appreciated

Comments

  • gpigpi
    edited 6:14AM
    Create report template for FR FMX Demo with problem and send it to support@fast-report.com

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.