Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Setting a filter for a view
Message
From
14/02/2008 18:39:41
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
14/02/2008 18:25:36
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01292853
Message ID:
01292857
Views:
17
The filter would have to be based on the view - not on the table - for this to work.

Personally, I usually create reports separately. You might use the same filter condition, for example:
lcFilter = ThisForm.cFilter
set filter to &lcFilter && Filters the view, for viewing on form
...
lcFilter = ThisForm.cFilter
select * from Table1;
  where &lcFilter;
  into cursor Tmp
report form ...
Here, of course, any DE should be eliminated from the report.

>Hi all,
>
>I've got a view set up that includes data from three tables. In my form, I set a filter on the view based upon user selections. But when I call the report form to print the requested output, the filter is ignored and all records are reported.
>
>I've tried setting the filter in the Data Environment, but it crashes VFP.
>
>What else can I do to make this work? And is there any other info I could give you to help understand the issue?
>
>Thanks very much!
>
>John
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform