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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Combining 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. 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. |
#2
|
|||
|
|||
Combining reports
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 -----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. 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. . |
#3
|
|||
|
|||
Combining reports
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.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 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. "Fons Ponsioen" wrote in message ... 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 -----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. 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. . |
#4
|
|||
|
|||
Combining reports
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. "Fons Ponsioen" wrote in message ... 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 -----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. 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. . . |
Thread Tools | |
Display Modes | |
|
|