Saves a report on the application server.
<HsvReports>.SetReport bstrName, nReportFileType, nReportType, lSecurityClass, bstrDescription, varabyFile, vbOverwriteExisting
Integer (ByVal). Identifies the file type of the report. Pass one of the constants listed in Document File Type Constants. | |
Integer (ByVal). Identifies the type of report. Pass one of the constants listed in Document Type Constants that represent report types. | |
Long (ByVal). The ID number of the security class for the report. You can get a security class’s ID number by passing its label to GetSecurityClassID. For details, see GetSecurityClassID. | |
Byte array (ByVal). The definition of the report. Pass the report definition as an array of bytes. You must pass a valid report definition. For details on report definitions, see the Oracle Hyperion Financial Management, Fusion Edition User's Guide. | |
Boolean (ByVal). If a report with the name passed as the bstrName argument exists, this determines whether the existing report will be overwritten. Pass TRUE to overwrite an existing report, FALSE otherwise. |
The following example creates a subroutine that changes the security class of an existing report. The subroutine, named setRptSecClass, takes the existing report’s name, file type, and report type, as well as the name of the desired security class. GetReport returns the report’s information, and the report’s current security class is then compared to the desired security class. If the security classes differ, the If structure deletes the report, then creates the new report with SetReport. Note that SetReport takes most of the report information returned by GetReport, with the only difference being that SetReport takes the ID of the security class passed to the subroutine.
Private Sub setRptSecClass(sName As String, lFile As Long, _ lRpt As Long, sNewSec As String) Dim cSecurity As HsvSecurityAccess, lSecID As Long Dim sDesc As String, sSecName As String, vabDef, lNewID As Long Set cSecurity = m_cSession.Security 'm_cReports is an HsvReports object reference m_cReports.GetReport sName, lFile, lRpt, lSecID, sDesc, vabDef cSecurity.GetSecurityClassLabel lSecID, sSecName If sSecName <> sNewSec Then cSecurity.GetSecurityClassID sNewSec, lNewID m_cReports.DeleteReport sName, lFile, lRpt m_cReports.SetReport sName, lFile, lRpt, lNewID, sDesc, _ vabDef, True End If End Sub
The subroutine uses HsvSecurityAccess methods to get the name of the existing report’s security class and to get the ID of the desired security class. For details on these methods, see GetSecurityClassLabel and GetSecurityClassID. |