Perhaps this code can help you, I use it in a TXbrowse Class:
oFr:SetUserDataSet(cName, cFieldNames,;
{|| IF( ! oRecSet:EOF() .AND. ! oRecSet:EOF(), oRecSet:MoveFirst(), ) } ,;
{|| IF( ! oRecSet:BOF() .AND. ! oRecSet:EOF(), oRecSet:MoveNext(), ) } ,;
{|| IF( ! oRecSet:BOF() .AND. ! oRecSet:EOF(), oRecSet:MoveLast, ) } ,;
{|| oRecSet:EOF() .OR. oRecSet:Bof() .OR. EMPTY( recordset ) } ,;
{ | cFieldName |
oRecSet:Fields( cFieldName ):Value } )
Pls, try to adapt it to Fastreport
Regards
SOI, s.a. de c.v.
soisa2002 at prodigy dot net dot mx
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (728) 2-85-10-10
Carpe diem quam minimum credula postero
oFr:SetUserDataSet(cName, cFieldNames,;
{|| IF( ! oRecSet:BOF() .AND. ! oRecSet:EOF(), oRecSet:MoveFirst(), ) } ,;
{|| IF( ! oRecSet:BOF() .AND. ! oRecSet:EOF(), oRecSet:MoveNext(), ) } ,;
{|| IF( ! oRecSet:BOF() .AND. ! oRecSet:EOF(), oRecSet:MoveLast(), ) } ,;
--
You received this message because you are subscribed to the Google Groups "FastReport for [x]Harbour, Alaska Xbase++, Visual FoxPro" group.
To post to this group, send email to fastreport_f...@googlegroups.com.
To unsubscribe from this group, send email to fastreport_for_x_h...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/fastreport_for_x_harbour?hl=en.
Hi Friends,
Thanks for the support. Unfortunately the problem remains as it is.
Dear Reinaldo,
As suggested by you, I tried
oFr:SetUserDataSet(cName, cFieldNames,;
{|| oRecSet:MoveFirst() } ,;
{|| oRecSet:MoveNext() } ,;
{|| oRecSet:MovePrev() } ,;
{|| oRecSet:EOF() .OR. oRecSet:BOF() .OR. Empty(oRecSet) } ,;
{ | cFieldName | oRecSet:Fields( cFieldName ):Value } )
It works fine if recordset contains data, but I if the recordset contains 0 records then it errors out. The screen snapshot of the error is attached herewith. It is the ADO error that occurs when you try to traverse on an empty recordset.
<FastRep Error.jpg>