Have a report with Several Group Headers and Footers. I have drawn vertical lines so that on the report they appear as solid lines going down the page. Today was asked to display an additional description in one of the headers only for one item. Thus, I set the text field up with an iif statement and set the height to 0.0146" so that I could see that something is there and then set the property to can grow/can shrink to yes. I placed the text box immediately below (touching) the existing text box. I stretched the lines within this group header section to be the height of the section. When I view the report, it leaves a white space below where the new text is displayed. I tried adding code to programmatically stretch the lines. While this did stretch the lines, it did not cover the white space and instead just pushed down the start of the next section (Detail Section). It didn't seem to matter whether the text that I wanted to display was visible (textbox grow) or not (textbox shrink).
Here is the code I tried for the line strech.
Sample Display:
[tt]
AN | | |
N | 5 | 5 |
P | 5 | 7 |
Tot | 10 | 12 |
AM | | |
G | 2 | 1 |
Tot | 2 | 1 |
[/tt]
How it looks with conditionally added textbox and code to stretch lines:
[tt]
AN | | |
NN | | |
| | |
N | 5 | 5 |
P | 5 | 7 |
Tot | 10 | 12 |
AM | | |
G | 2 | 1 |
Tot | 2 | 1 |
[/tt]
Here is the code I tried for the line strech.
Code:
Private Sub GroupHeader0_Format(Cancel As Integer, FormatCount As Integer)
If Me.col = "BN" Then
Me.Line226.Height = "0.25" * 1244
Else
Me.Line226.Height = "0.15" * 1244
End If
End Sub
Sample Display:
[tt]
AN | | |
N | 5 | 5 |
P | 5 | 7 |
Tot | 10 | 12 |
AM | | |
G | 2 | 1 |
Tot | 2 | 1 |
[/tt]
How it looks with conditionally added textbox and code to stretch lines:
[tt]
AN | | |
NN | | |
| | |
N | 5 | 5 |
P | 5 | 7 |
Tot | 10 | 12 |
AM | | |
G | 2 | 1 |
Tot | 2 | 1 |
[/tt]