Combining/Merging Reports

  • Thread starter Thread starter Mac
  • Start date Start date
M

Mac

I have about 2 dozen reports which need to be printed either seperately or
all together. Seperately they are fine but I want to combine them without
duplicating the whole lot on one massive report.

This would save masses of time and avoid potential problems from subreport
events.

The reports are used via a webservice/dll using office xp interop
assemblies, passing
in my parameters, which are collected in the Report_Open event of each
report. The report is opened and a snp file generated using the following
code

appAccess.DoCmd.OpenReport(reportName,Access.AcView.acViewPreview,
System.Reflection.Missing.Value, System.Reflection.Missing.Value,
Access.AcWindowMode.acHidden, MyParameterID)

appAccess.DoCmd.OutputTo(Access.AcOutputObjectType.acOutputReport,
reportName, Access.Constants.acFormatSNP, outputFile, false, null, null);


An simplified example of a typical report_open event is below.

Private Sub Report_Open(Cancel As Integer)
Dim ReviewID As String
Dim sp As ADODB.Recordset
ReviewID = Reports![Report7].OpenArgs
Me.RecordSource = " exec aCash " & ReviewID
End Sub

I would like to use the following snippet in a Report_Open event to open
each report
for my 'all in one' but I don't know how to go from opening the report to
inserting it into the current report so I can combine them all.
The following code will execute ok from the Report_Open event but nothing is
displayed in the details section of the generated report.

DoCmd.OpenReport "PageCoverSheet", acViewPreview, , , acHidden, ReviewID

Any ideas?

Thanks
Mac.
 
The simple solution: create a new report with a Subreport
control on it for each of the reports you want to print.
Print the new report and you'll print each of the current
reports.

Larry Linson
Microsoft Access MVP
-----Original Message-----
I have about 2 dozen reports which need to be printed either seperately or
all together. Seperately they are fine but I want to combine them without
duplicating the whole lot on one massive report.

This would save masses of time and avoid potential problems from subreport
events.

The reports are used via a webservice/dll using office xp interop
assemblies, passing
in my parameters, which are collected in the Report_Open event of each
report. The report is opened and a snp file generated using the following
code

appAccess.DoCmd.OpenReport (reportName,Access.AcView.acViewPreview,
System.Reflection.Missing.Value,
System.Reflection.Missing.Value,
Access.AcWindowMode.acHidden, MyParameterID)

appAccess.DoCmd.OutputTo (Access.AcOutputObjectType.acOutputReport,
reportName, Access.Constants.acFormatSNP, outputFile, false, null, null);


An simplified example of a typical report_open event is below.

Private Sub Report_Open(Cancel As Integer)
Dim ReviewID As String
Dim sp As ADODB.Recordset
ReviewID = Reports![Report7].OpenArgs
Me.RecordSource = " exec aCash " & ReviewID
End Sub

I would like to use the following snippet in a Report_Open event to open
each report
for my 'all in one' but I don't know how to go from opening the report to
inserting it into the current report so I can combine them all.
The following code will execute ok from the Report_Open event but nothing is
displayed in the details section of the generated report.

DoCmd.OpenReport "PageCoverSheet", acViewPreview, , , acHidden, ReviewID

Any ideas?

Thanks
Mac.





.
 
Unfortunately the simple solution will cause problems I think

Events behave differently/dont fire in subreports from reports do they not,
which would cause some of my reports to display incorrectly.
Also can subreports have subreports?

I gather Access cannot add existing reports into a new report programmically
then?

Thanks
Mac.


Larry Linson said:
The simple solution: create a new report with a Subreport
control on it for each of the reports you want to print.
Print the new report and you'll print each of the current
reports.

Larry Linson
Microsoft Access MVP
-----Original Message-----
I have about 2 dozen reports which need to be printed either seperately or
all together. Seperately they are fine but I want to combine them without
duplicating the whole lot on one massive report.

This would save masses of time and avoid potential problems from subreport
events.

The reports are used via a webservice/dll using office xp interop
assemblies, passing
in my parameters, which are collected in the Report_Open event of each
report. The report is opened and a snp file generated using the following
code

appAccess.DoCmd.OpenReport (reportName,Access.AcView.acViewPreview,
System.Reflection.Missing.Value,
System.Reflection.Missing.Value,
Access.AcWindowMode.acHidden, MyParameterID)

appAccess.DoCmd.OutputTo (Access.AcOutputObjectType.acOutputReport,
reportName, Access.Constants.acFormatSNP, outputFile, false, null, null);


An simplified example of a typical report_open event is below.

Private Sub Report_Open(Cancel As Integer)
Dim ReviewID As String
Dim sp As ADODB.Recordset
ReviewID = Reports![Report7].OpenArgs
Me.RecordSource = " exec aCash " & ReviewID
End Sub

I would like to use the following snippet in a Report_Open event to open
each report
for my 'all in one' but I don't know how to go from opening the report to
inserting it into the current report so I can combine them all.
The following code will execute ok from the Report_Open event but nothing is
displayed in the details section of the generated report.

DoCmd.OpenReport "PageCoverSheet", acViewPreview, , , acHidden, ReviewID

Any ideas?

Thanks
Mac.





.
 
Back
Top