Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Impromptu Report Attributes audit

Status
Not open for further replies.
Jan 30, 2004
1
GB
We're about to review 600+ Impromptu Reports. Is there a snazzy piece of software that can record all the attributes within each report. I dread the thought of doing this manually!

Once this is done, we may even consider a data warehouse.

Thanks in advance

Graham
 
Graham
I don't know whether or not this is what you are looking for, but here's a link

Also, within the past week, one of the posts mentioned a company that has several Access add-ons available at not too hefty a price. Not sure if I can find it or not. If I can, I'll point you to it.

Tom
 
This is based on something I found in the MS Knowledge Base once upon a time--it opens each report in design view and lifts the property/value combinations (too bad they're not available otherwise). *Setting application.echo avoids the GUI mess of have each report open and shut.

This drops all properties into a table (the table isn't hard to figure out):

[tt]

Public Sub DocumentObjectProperties()
On Error GoTo Error_ShowReportSources

Dim db As DAO.Database

Dim AllReports As DAO.Container
Dim Doc As DAO.Document
Dim Prp As DAO.Property

Set db = CurrentDb()

Set AllReports = db.Containers("Reports")
Application.Echo False

'TRUNCATE TABLE
CurrentProject.Connection.Execute ("delete * from object_properties")

For Each Doc In AllReports.Documents

DoCmd.OpenReport Doc.NAME, acViewDesign
For Each Prp In Doc.Properties
InsertObjectProperty "Report", Doc.NAME, Prp.NAME, Prp.Value
DoCmd.Close acReport, Doc.NAME
Next
Next

Exit_ShowReportSources:
MsgBox "Done"
Set Doc = Nothing
Set Con = Nothing
Set db = Nothing

Application.Echo True
Exit Sub
Error_ShowReportSources:
MsgBox Err.Number & ": " & Err.Description
Resume Exit_ShowReportSources
End Sub

Private Sub InsertObjectProperty(v_object_type As String, _
v_object_name As String, v_property_name As String, v_property_value As String)

Dim strSQL As String

strSQL = "insert into object_properties (object_type,object_name ,property_name, " & _
"property_value) values (" & _
Chr(39) & v_object_type & Chr(39) & "," & _
Chr(39) & v_object_name & Chr(39) & "," & _
Chr(39) & v_property_name & Chr(39) & "," & _
Chr(34) & v_property_value & Chr(34) & ");"

CurrentProject.Connection.Execute (strSQL)

End Sub

[/tt]

Turn your headache into my project!
Jeffrey R. Roberts
Insight Data Consulting
Access and SQL Server Development
 
* You can hard code this to just get the properties that you're interested in rather than looping through all of them.

Turn your headache into my project!
Jeffrey R. Roberts
Insight Data Consulting
Access and SQL Server Development
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top