Hi Denis.
>When I try to preview a certain report (or if I try to apply a filter to it) I receive the error message "Cannot find field definitions".
As John pointed out, this error occurs when SFReports looks into the FRX to figure out what fields it reports on (the reason we need to do that is so we know what fields are required in the cursor, although since you have code in DOQUERY, we don't really need that information). The most likely reason that it doesn't find any matches in the fields collection for the fields in the FRX is that they are unaliased in the FRX (eg. COMPANY rather than CUSTOMER.COMPANY). Since in this case we don't really need to know what fields are in the FRX, we'll look at handling that better.
In the meantime, you can eliminate this problem by putting the following code into the GetFieldsCollection method of your SFRWizard form or subclass:
with This
if .oFieldsCollection.Count = 0
.oReportEngine.GetFieldsCollection(This)
.ClearDataEnvironment()
endif .oFieldsCollection.Count = 0
endwith
Doug