A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Combining/Merging Reports



 
 
Thread Tools Display Modes
  #1  
Old May 21st, 2004, 02:31 PM
Mac
external usenet poster
 
Posts: n/a
Default Combining/Merging Reports

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.AcVie w.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.





  #2  
Old May 21st, 2004, 07:38 PM
Larry Linson
external usenet poster
 
Posts: n/a
Default Combining/Merging Reports

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.





.

  #3  
Old May 24th, 2004, 10:45 AM
Mac
external usenet poster
 
Posts: n/a
Default Combining/Merging Reports

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" wrote in message
...
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.





.



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:36 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.