Reputation: 919
I have created a Report with grouped data, as seen in the top half of the image. I would ideally like the grouping to look like the bottom half of the image. Is this possible in Access, and if so, how do I achieve this? Thanks.
Upvotes: 0
Views: 1330
Reputation: 112259
There is no easy way to place sections side-by-side in Access. Reports have a property MoveLayout
that can be set to False
in code. The result of this is that the next section will start to print at the same vertical position and thus print several sections overlayed on top of each other.
This is a code example from one of my reports where I set this property depending on a field value:
Private Sub GroupHeader2_Format(Cancel As Integer, FormatCount As Integer)
If FormatCount = 1 Then
If IsNull(Me!Pruefpunkt) Then
Me.MoveLayout = False
End If
End If
End Sub
You will probably have to set this property to False
in the group sections headers and to true in the details section and group sections footers. Do this in the Format
event of the sections.
UPDATE (in response to comment)
It works for me
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
MoveLayout = True
End Sub
Private Sub GroupHeader0_Format(Cancel As Integer, FormatCount As Integer)
MoveLayout = False
End Sub
Private Sub GroupHeader1_Format(Cancel As Integer, FormatCount As Integer)
MoveLayout = False
End Sub
With a report looking like this
The result looks like this
Upvotes: 1