Header must grow same amount as detail

J

Janie

I know this may seem odd, but honestly, this is what I need to make the
layout proper.

I have GroupHeader1. It Can Grow.
I have GroupHeader2. It Can Grow.
I have Detail. It Can Grow.

The layout results in:
GroupHeader1 GroupHeader2 Detail Item1
Detail Item2
Detail Item3
GroupHeader2 Detail Item1
Detail Item2
GroupHeader1 GroupHeader2 Detail Item1

The report requires a horizontal row at each Detail Item.

Detail Items may vary in height.
GroupHeader1 Items may vary in height.
GroupHeader2 items may vary in height.

Here's the tricky part: At all times the height of GroupHeader1,
GroupHeader2 and Detail Item MUST be the same WHICH EVER IS THE GREATEST
AMOUNT.

Otherwise what happens in the horizontal line of Detail may cross through
the verbiage of GroupHeader1 or Groupheader2.

The width of the textboxes cannot be adjusted further.

Making sense?
 
M

microsoft

1) How are you getting the headers on the same line as the detail?

2) If the only thing in the 'headers' are text, you can add text boxes to
the detail section and then use the Format event of the detail section to
change the visibility of the text boxes making this...

10328 3/5/10 3/13/10
10328 3/10/10 3/17/10
10328 3/16/10 3/18/10
10328 3/24/10 3/31/10

Becomes
10328 3/5/10 3/13/10
3/10/10 3/17/10
3/16/10 3/18/10
3/24/10 3/31/10

Declare a module level variable
Dim showTrailerNumberInDetail As Boolean

'In the Format event of the Header set it to True
Private Sub Header_TrailerNumber_Format(Cancel As Integer, FormatCount As
Integer)

If FormatCount = 1 Then
showTrailerNumberInDetail = True
End If

End Sub

'In the Format event of the detail set the visible property, in this
example, there are two labels that I'm only printing with the first line of
detaiil
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)

if FormatCount = 1 then
Me.txtTrailerDOTNumber_Detail.Visible = showTrailerNumberInDetail
Me.txtVendorCrossReference_detail.Visible =
showTrailerNumberInDetail
showTrailerNumberInDetail = False
end if

End Sub
 
J

Janie

by using Me.MoveLayout=False at the Sub GroupHeader1_Format and Sub
GroupHeader2_Format, the headers do not advance a line allowing the head and
subhead to print on the same line as the first detail. So then when the
Groupheader2 text has changed, but the GroupHeader1 text has not, only the
GroupHeader2 Text appers on the same line as the detail. And if neither has
changed, neither shows up.

very handy.

Haven't been able to make your suggestion work, but appreciate the effort.
 
D

Duane Hookom

Why not remove the group sections. You should be able to just place all of
the controls in the detail section and set the Hide Duplicates to Yes for
the groups.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top