EsbReportFile() sends a report specification to the active database from a file. The report data can either be output, or the report specification can just be verified and any errors returned. Also, the corresponding data blocks in the Database can optionally be locked by this call (lock for update).
EsbReportFile (hDestCtx, hSrcCtx, AppName, DbName, FileName, isOutput, isLock)
ByVal hDestCtx As Long ByVal hSrcCtx As Long ByVal AppName As String ByVal DbName As String ByVal FileName As String ByVal isOutput As Integer ByVal isLock As Integer
hDestCtx | Essbase VB API context handle of a target Database on the server. |
hSrcCtx | Essbase VB API context handle for the report file location. The report file can reside on the client or on the same server as the target Database. If the report file is on the client (local), the local context must be created with EsbCreateLocalContext(). |
AppName | Application name for the report file location. |
DbName | Database name for the report file location. |
FileName | Name of the report specification file. It is not necessary to specify the file extension; the extension is understood to be .rep. |
isOutput | Controls output of data. If TRUE, data is output from the server, according to the specified report. If FALSE, no data is output. |
isLock | Controls block locking. If TRUE, all blocks which are accessed by the report specification are locked for update. If FALSE, no blocks are locked. |
Declare Function EsbReportFile Lib "ESBAPIW" (ByVal hDestCtx As Long, ByVal hSrcCtx As Long, ByVal AppName As String, ByVal DbName As String, ByVal FileName As String, ByVal Output As Integer, ByVal Lock As Integer) As LongSub ESB_ReportFile () Dim sts As Long Dim AppName As String Dim DbName As String Dim FileName As String Dim pOutput As Integer Dim pLock As Integer Dim hSrcCtx As Long Const szRString = 256 Dim RString As String * szRString AppName = "Sample" DbName = "Basic" hSrcCtx = hCtx FileName = "test" pOutput = ESB_YES pLock = ESB_NO sts = EsbReportFile(hCtx, hSrcCtx, AppName, DbName, FileName, pOutput, pLock) If sts = 0 Then sts = EsbGetSTring(hCtx, RString, szRString) Do While Mid$(RString, 1, 1) <> Chr$(0) Print RString sts = EsbGetSTring(hCtx, RString, szRString) Loop End If End SubEsbBeginReport()