Hi Mike.
>When I print a report, it ignores the filter I choose in Step 2. The report is based on the cursor I create in the DoQuery field.
>
>Does SFReports filter my cursor (or something else) automatically, or do I have to do it?
SFReports doesn't filter the cursor; it uses the query condition in the creation of the cursor. So, if you create your own cursor, include the exposed variable lcFilter (which contains the query expression) in your code. For example, here's some code I have in DOQUERY in a custom app I wrote for a client:
lcThisFilter = iif(empty(lcFilter), '', ' where ' + lcFilter)
select NAMES.ABBREV, ;
NAMES.LOCAL, ;
sum(RECEIPTS.MONTHS) as MONTHS, ;
sum(RECEIPTS.MEMBERS) as MEMBERS, ;
NAMES.PAID_TO ;
from NAMES ;
join RECEIPTS ;
on NAMES.ID_NUM = RECEIPTS.ID_NUM ;
&lcThisFilter ;
group by NAMES.ID_NUM ;
order by 1, 2 ;
into cursor (lcCursor)
Doug