Your opinion about multi-page reports

spectraflame

Well-known Member
Joined
Dec 18, 2002
Messages
830
Office Version
  1. 365
Platform
  1. Windows
Currently I have a report created that is a single page (portrait). I have now been asked to include a second page (landscape) to include all inventory items for the specific department that is on the first page.

My question is would it be better to have a separate report for the inventory information and just link the data based on the department name or would be just as easy to include the inventory sheet with the first sheet? I was not for sure if I could have to pages of the same report have different modes (portrait & landscape).

Also is it possible to create a report with multiple column? I would like to have the report display the inventory information in 3 sections on a single page.
Book1
ABCDEFGHIJKLMN
1ClassificationItem#DescriptionQuantityClassificationItem#DescriptionQuantityClassificationItem#DescriptionQuantity
2WaterMetersW50012"Meter2ClampsW61004"1PipeW7200PVC-8ft.1
3W50024"Meter5W61015"2W7201Iron-10ft.2
4
5
6
7
8
9
10
11
12
Sheet1



Thanks,
Matthew
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
To make things simple (?).

How about -

Create the second "Landscape" report
Create a Macro which runs one after the other.
On a suitable Menu\Switchboard Form
Attach the macro to a Command Button using the ON Click Event
When the user selects their button the two reports are printed consecutively.

HTH
Bernard
 
Upvote 0
Here is the current macro that I am using to print the current record to the first form. I created another loandscape report like you suggested, Invenrpt, but I am not sure where to insert the code to have it printed. The department from the main order entry form will dertermine which departments inventory items are printed out. I will be using Me!WOType to determine this.

Private Sub Print_Record_Click()
On Error GoTo Err_Print_Record_Click

Dim strDocName As String
Dim strWhere As String
strDocName = "WorkOrderrpt"
strWhere = "[RecordID]=" & Me!RecordID
'DoCmd.OpenReport strDocName, acPreview, , strWhere
DoCmd.OpenReport strDocName, acNormal, , strWhere

Exit_Print_Record_Click:
Exit Sub

Err_Print_Record_Click:
MsgBox Err.Description
Resume Exit_Print_Record_Click

End Sub
 
Upvote 0
Re your question on multiple columns -- yes, it's pretty simple.

In Detail view on the report, one of the properties is the # of columns -- you can also set the column spacing. Just be aware that your layout is now restricted to the width of a SINGLE column; get all your controls in that width and you'll be OK

As for the code...

Code:
Private Sub Print_Record_Click() 
On Error GoTo Err_Print_Record_Click 

Dim strWhere As String 
strWhere = "[RecordID]=" & Me!RecordID 
'change acNormal to acPreview if you need to view before printing
DoCmd.OpenReport "WorkOrderrpt", acNormal, , strWhere 
DoCmd.OpenReport "InvenRpt", acNormal, , strWhere 

Exit_Print_Record_Click: 
Exit Sub 

Err_Print_Record_Click: 
MsgBox Err.Description 
Resume Exit_Print_Record_Click 

End Sub
 
Upvote 0
I played around with it last night and the following code works for me. Can you tell me if I have lines in there that I do not need? I was thinking that I needed to split it up in this manner becuase the second sheet "Invenrpt" needed to be filtered by something different than RecordID.

Private Sub Print_Record_Click()
On Error GoTo Err_Print_Record_Click

Dim strDocName As String
'Dim strWhere As String
strDocName = "WorkOrderrpt"
'strWhere = "[RecordID]=" & Me!RecordID
'DoCmd.OpenReport strDocName, acPreview, , strWhere
DoCmd.OpenReport strDocName, acNormal, , strWhere

Dim strDocName2 As String
Dim strWhere2 As String
strDocName2 = "Invenrpt"
strWhere2 = "[WOType]=" & Me!WOType
'DoCmd.OpenReport strDocName, acPreview, , strWhere
DoCmd.OpenReport strDocName2, acNormal, , strWhere

Exit_Print_Record_Click:
Exit Sub

Err_Print_Record_Click:
MsgBox Err.Description
Resume Exit_Print_Record_Click

End Sub
 
Upvote 0
Looks OK to me, but this would be a bit more concise:

Code:
Private Sub Print_Record_Click() 
On Error GoTo Err_Print_Record_Click 

Dim strWhere As String 
strWhere = "[RecordID]=" & Me!RecordID 
strWhere2 = "[WOType]=" & Me!WOType
'change acNormal to acPreview if you need to view before printing 
DoCmd.OpenReport "WorkOrderrpt", acNormal, , strWhere 
DoCmd.OpenReport "InvenRpt", acNormal, , strWhere2 

Exit_Print_Record_Click: 
Exit Sub 

Err_Print_Record_Click: 
MsgBox Err.Description 
Resume Exit_Print_Record_Click 

End Sub
Denis
 
Upvote 0

Forum statistics

Threads
1,221,816
Messages
6,162,149
Members
451,746
Latest member
samwalrus

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top