>***************************************************** >* Create a filter using the sfquery.vcx >***************************************************** >local lcAlias >lcAlias=alias() >* Make sure any previous one is gone >IF VARTYPE(goquery)=[O] > RELEASE goQuery >ENDIF >LOCAL llError >IF FILE('c:\dev.cq') > ON ERROR >else > ON ERROR llError=.t. >ENDIF >****************************************************** >* Create the query object >****************************************************** >goQuery=NEWOBJECT("sfquery","c:\ctsql\stone\sfquery\sfquery.vcx") >IF USED('sqlresult') > select sqlresult > * Select our alias (it is always this alias from the reporting dialog > with goQuery > .calias=[sqlresult] > .cFilter=" " > * Display the sfquery dialog > .show() > * Set the filter on the cursor > lcFilter=goQuery.cFilter > thisform.frmFilter=lcFilter > set filter to &lcFilter > ENDWITH >ENDIF >ON ERROR DO errsys WITH ERROR(),MESSAGE(1),MESSAGE(),PROGRAM(), LINE(1) >>