Variable Image Height not Paging Properly
I'm using Firemonkey (Alexandria) and version 2022.1 of Fast Report. I have a report that prints a detail line and then any images for that item in a subreport below the detail line. I adjust the height of the image in the subreport with code in the .fr3 based on whether the image is in portrait or landscape format, since I am trying to limit the blank space in the report. However, it seems if the image does not quite fit in the remaining space on the page it does not print the image on the next page, but instead causes issues with the following detail line (pushing it way down the next page).
Here is the internal code I'm using in the report:
procedure Picture1OnBeforePrint(Sender: TfrxComponent);
if (<frxDBPictures."Picture1"> = '') and (not <PicPrinted>) then begin
txtNoPictures.Visible := True;
PicHeader.Height := fr1in * 0.20;
Picture1.Visible := False;
Picture1.Height := fr1in * 0.20;
Picture1.Width := Picture1.Height;
PicData.Height := fr1in * 0.20;
txtNoPictures.Visible := False;
PicHeader.Height := fr1in * 0.25;
Picture1.Height := fr1in * <PicHeight>;
Picture1.Width := fr1in * <PicWidth>;
Picture1.Visible := True;
PicData.Height := fr1in * <PicHeight>;
PicData.ColumnWidth := Picture1.Width;
Code in the program itself sets the values of PicHeight and PicWidth based on the particular image, but limited to 3.5 inches wide.
What do I need to do to get the image to print on the next page if it does not fit on the current page?