Starts sending a report specification to the active database. This call must be followed by successive calls to EsbSendString to send the report specification, and finally by a call to EsbEndReport. 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
EsbBeginReport (hCtx, isOutput, isLock) ByVal hCtx As Long ByVal isOutput As Integer ByVal isLock As Integer
Parameter | Description |
---|---|
hCtx | VB API context handle. |
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. |
Notes
This function must be followed by at least one call to EsbSendString(), followed by a call to EsbEndReport().
If this function causes data to be output (Output flag is TRUE), the returned data can be read by calling EsbGetString().
If this function causes blocks to be locked (Lock flag is TRUE), the caller is responsible for unlocking the locked blocks (e.g. by calling EsbUpdate() with the Unlock flag set to TRUE).
If both the Output and Lock flags are set to FALSE, the database merely performs a syntax check of the report specification.
Return Value
None.
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 EsbBeginReport Lib "ESBAPIN" (ByVal hCtx As Long, ByVal Output As Integer, ByVal Lock As Integer) As Long Sub ESB_BeginReport () Dim sts As Long Dim pOutput As Integer Dim pLock As Integer Dim Query As String Dim RString as String * 256 Const szRString = 256 Query = "<Desc Year !" Output = ESB_YES Lock = ESB_NO '************* ' Begin Report '************* sts = EsbBeginReport (hCtx, pOutput, pLock) '************************** ' Send report specification '************************** sts = EsbSendString (hCtx, Query) '*********** ' End Report '*********** sts = EsbEndReport (hCtx) '********************** ' Print out all strings '********************** 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