I have a need to try to compress a report as much as possible. Two main report controls are one displaying a table memo field and a second displaying a table OLE OBject (embedded picture). About half the input table entries contain a picture. The picture, when present is displayed as 2.5″wx2″h and the memo text and picture are displayed side by side. My objective when there is no picture is to reduce the height of the picture control and extend the width of the text memo control. Thus reducing the overall length of the report.
I’ve added the following code to the Detail_Format sub:
If _
Len(nz(Me!UM_Pic,””))= 0 _
Then
Me!UM_Textx.Width = 6 * 1440
Me!UM_Pic.Height = 0
Else
Me!UM_Textx.Width = 4 * 1440
Me!UM_Pic.Height = 2 * 1440
End If
Detail.Height = 1
End Sub
What’s happening when there is a picture is the height of the Detail section is over an 1″ greater than the tallest control (for testing both controls have a top of zero). When there is no picture the text prints as desired. For testing I included a border on the memo and picture. The picture is the correct 2″ tall and the text is shorter than the picture, but there is 1 5/8″ gap between the bottom of the picture and the top of the next paragraph.
Appreciate any thought on how to eliminate the gap.
Marty