Combining 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.

Is it possible to create a report which can call and add each report in turn
via vba?

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

Thanks
Mac.
 
You can combine several reports in the on click event of a
print button on a form, simply replicate the
stDocName = "Report1"
DoCmd.OpenReport stDocName, acNormal
in the onclick event procedure.
Hope this helps
 
The reports are used via a webservice/dll so there is no form or buttons to
click as such.
The reports are opened and closed 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 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.

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


Thanks
Mac.
 
I have never used webserve/dll. What I would suggest is
re-post an give the below description, I think you will
get some responses.
Good Luck
Fons
-----Original Message-----
The reports are used via a webservice/dll so there is no form or buttons to
click as such.
The reports are opened and closed 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 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.

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


Thanks
Mac.


You can combine several reports in the on click event of a
print button on a form, simply replicate the
stDocName = "Report1"
DoCmd.OpenReport stDocName, acNormal
in the onclick event procedure.
Hope this helps add
each report in turn


.
 
Back
Top