EsbReportFile

Description

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).

Syntax
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

Parameters

hDestCtxEssbase VB API context handle of a target Database on the server.
hSrcCtxEssbase 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().
AppNameApplication name for the report file location.
DbNameDatabase name for the report file location.
FileNameName of the report specification file. It is not necessary to specify the file extension; the extension is understood to be .rep.
isOutputControls output of data. If TRUE, data is output from the server, according to the specified report. If FALSE, no data is output.
isLockControls block locking. If TRUE, all blocks which are accessed by the report specification are locked for update. If FALSE, no blocks are locked.

Return Value

None.

Notes

Access

This function requires the caller to have read privilege (ESB_PRIV_READ) to one or more members in the active database.

Example

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 Sub

See Also

EsbBeginReport()
EsbGetString()
EsbReport()
EsbUpdateFile()