Everything you need can be obtained programatically. Below are some pseudo-code snippets which outline the basics.
Code:
Sub BuildReport (<Param list>)
Dim TheReport As Report
Dim TheCntrl As Control
DoCmd.OpenReport "ReportName", acViewDesign, vbNullString, vbNullString
Set TheReport = Application.Reports(rStr_ReportName)
You can access many of the report properties, specifically, the Query for the Report and Width are shown
Code:
ReportQuery = TheReport.RecordSource
ReportWidth = TheReport.Width
Then you can loop through all of the controls on the report
Code:
For Each TheCntrl In TheReport.Controls
Then you can evaluate all of the properties of each control. You have the basic properties
Code:
TheCntrl.Name
TheCntrl.Left
TheCntrl.Top
TheCntrl.Width
TheCntrl.Height
TheCntrl.BorderStyle
and many others. Use a Watch window to see all of them. You also need to pay attention to a number of the special properties such as the following:
Code:
Select Case (TheCntrl.Section)
Case acPageHeader, acHeader
Case acDetail
Case acPageFooter, acFooter
End Select
Select Case (TheCntrl.ControlType)
Case acLabel
TheCntrl.Caption
Case acTextBox
TheCntrl.ControlSource
TheCntrl.TextAlign
TheCntrl.FontName
'(and the other font properties as well)
' (A Subreport)
'(this is the name of the subreport)
Code:
lCol_SubReports.Add TheCntrl.SourceObject
' This used later on to recurse through all subreports
Code:
Case acLine, acRectangle
End Select
Next TheCntrl
There are of course many other types of controls that you may have included in your reports. Close the main report and now run through all of the subreports - recursive calling the same routine
Code:
DoCmd.Close acReport, rStr_ReportName, acSaveNo
For lInt_Idx = 1 To lCol_SubReports.Count
BuildReport lCol_SubReports.Item(lInt_Idx)
' Recurse through the sub-reports
In reality, you'll need to get the left and top offset of the subreport and add them to the individual controls for absolute positioning since the subreport control positions are relative to the start of the subreport.
Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein