Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Filter is SFReports
Message
From
25/11/1999 10:46:09
 
 
To
24/11/1999 18:12:01
General information
Forum:
Visual FoxPro
Category:
Stonefield
Miscellaneous
Thread ID:
00295379
Message ID:
00295550
Views:
22
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform