I have a multicolumns report, which is the labels (column headings) are displayed on the left side of the report,
and the data is printed next (on the right side) to the labels. As an example shown below.
-----------------------------------------------------------------------
Company1 Company2 Company3
Current Month 09/08/2014 09/08/2014 09/08/2014
Line1 Data ABC DEF GHI
Prior Month 08/08/2014 08/08/2014 08/08/2014
Line1 Data STU VXYZ CBA
-----------------------------------------------------------------------
The procedure below is the code that I use to generate the report above.
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
On Error GoTo ErrorHandler
Dim i As Integer
If Me.Left < 1.75 * 1440 Then
Me.NextRecord = False
For i = 1 To 5
Me("txt" & i).Visible = False
Me("lbl" & i).Visible = True
Next i
Else
For i = 1 To 5
Me("txt" & i).Visible = True
Me("lbl" & i).Visible = False
Next i
End If
ExitProcedure:
Exit Sub
ErrorHandler:
MsgBox "Error Number: " & Err.Number & vbNewLine & "Error Description: " & Err.Description, vbExclamation
Resume ExitProcedure
End Sub
Now, is it possible to format the report, insert the Prior Month before the Current month,
so the data will be printed as a column, side by side, next to each other like this.
-------------------------------------------------------------------------------------------------------------------------
Prior Month Current Month Prior Month Current Month Prior Month Current Month
Company1 Company1 Company2 Company2 Company3 Company 3
08/08/2014 09/08/2014 08/08/2014 09/08/2014 08/08/2014 09/08/2014
STU ABC VXYZ DEF CBA GHI
--------------------------------------------------------------------------------------------------------------------------
Phucon.
Posted by: saigonf7q5@yahoo.com
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (1) |
Tidak ada komentar:
Posting Komentar