Database Reference
In-Depth Information
Table 10.1 Newer VBA Functions
Function
Description
hypAddLro
hypDeleteLros
hypDeleteAllLros
hypListLro
hypretrieveLro
hypupdateLro
Linked reporting objects are a useful addition to reports. The
ability to programmatically manage Lros adds a new dimension of
functionality for user and admins. These functions allow you to add
custom forms, buttons, etc., for making Lro use by your user easy
and intuitive.
hypSetoption
hypgetoption
These two little gems greatly simplify the management of Smart view
options. With these you can set default options, and options that are
specific to a particular sheet. A great way to use these is to set a
company standard for Smart view options (which reduces frivolous
calls for help). Store each of the settings in a table, and then have
your Smart view application look up and set these before your user
starts work as in the example below.
Sub svEnforceEnterpriseSettings()
Dim cn As New Connection
Dim rs As Recordset
Dim svRetVal As Long
With cn
.ConnectionString = "driver={SQL Server};" & _
"server=MyServer;uid=sa;pwd=pwd;database=MySmartViewDB"
.ConnectionTimeout = 30
.Open
End With
strQuery = "SELECT * FROM MySVSettings"
Set rs = cn.Execute(strQuery)
Do While Not rs.EOF
svRetVal = hypSetOption(rs.Fields("SETTING_NAME"),
rs.Fields("SETTING_VALUE"), "MySvSheet")
rs.MoveNext
Loop
rs.Close
cn.Close
End Sub
hypgetmemberInformation
hypmenuvmemberInformation
If you've ever wanted to extract outline or dimension information, or
place account, period, or entity property information on a report
next to the member, this is your function. This little powerhouse
provides access to 39 different member properties. Look for the
table “Constants for member Information” in the Smart view user's
guide. If you want to skip having to loop over the collection of
member property constants and just want a dialog with everything
already there, the second function on the left will do just that.
hypgetDrillThoughreports
hypExecuteDrillThroughreport
your imagination should be swirling by now. The first function on the
left gets a list of drill through reports. Just use the one below it to
execute the chosen report. With these two functions, you can create
a dialog that contains a dropdown for the list of drill through reports
available on the current sheet, and button to execute that report.
( Continued )
Search WWH ::




Custom Search