system
#1
Hi all,
I need to extract the SQL stt of a variable in a report and print it into a text file.
To further explain my “SQL stt of a variable”, in Designer, if you click the ‘Properties’ of a variable, you can see what is written under ‘Select’.
I need to write some VBA codes to extract these from a report to a text file and I really have no idea how to go about doing it…
I think I have to declare a universe variable, include the designer’s variables, then after that I really am lost…
Does anyone has a full solution for this lost soul?
Thank you so much.
obeel
obeel (BOB member since 2004-02-10)
system
#2
You can download from Bob’s Downloads the Excel Utility for mass update of a universe :
Mass update to object names / descriptions
The next step - replace the GetInfo procedure with the following one:
Sub GetInfo()
Set DesignerApp = New Designer.Application
DesignerApp.Visible = True
Call DesignerApp.LoginAs
Set Univ = DesignerApp.Universes.Open
DesignerApp.Visible = False
Set Wksht = ThisWorkbook.Worksheets("Objects")
Wksht.Unprotect
Range("Objects").ClearContents
Call GetObjectInfo(Univ.Classes, 1)
Range("Objects").Resize(Wksht.UsedRange.Rows.Count - 1, 5).Name = "Objects"
Range("Objects").Columns("D:E").Value = Range("Objects").Columns("B:C").Value
Wksht.Protect
DesignerApp.Quit
Set DesignerApp = Nothing
End Sub
You`ll be able to save the document as text or whatever.
sharone (BOB member since 2002-10-17)