Hi all,
So I’m attempting to learn how to use the XResultSet commands. I need to do so for automating our client statement functions.
I’m trying to build a command button on our Client CRM screen that creates a merge doc file, pulling information from our Client, Staff, and Payment database.
I need my command button on the Client screen to go to the Payment database, and compare payments made between two date ranges for that specific client number, and return with a sum. Because I’m pulling on two commands, I understand I need to use XResultSet.
So I’ve tried building a sample XresultSet command to do the following:
#include "sbasic_include.sbas"
var vRSHandle as int
var vNoOfRecords as int
vRSHandle = @XResultSetSearch(@FN, "Payments", SEARCH_MODE_AND, SEARCH_SYNTAX_QA,
"!PmtCltNo=3031", !PmtDate >=”Mar 1, 2012”)
vNoOfRecords = @XResultSetTotal(vRSHandle)
WriteLn(vNoOfRecords)
I know from looking at the raw data, this should bring back a result of “201” (as I have 201 payments between that date range), however WriteLn is bringing back “-1”.
Am I missing something?