Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing Parameters Into A Report
Message
From
20/07/2005 06:03:15
 
 
To
20/07/2005 02:31:47
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
01034130
Message ID:
01034159
Views:
28
>Hi all,
>
> I want to import a set of records into my report but i want to filter it by the record's date. I'm able to generate the sql statement with a fixed date, but how about ask the date from the user and then put it into the sql statement and view it in the report? Does anybody know how to do it?
>
>Thanks.

Chin

You mean put the date on the report and include it as a variable in the SQL?

1) Declare a date variable in your code. Make a new field object in the report and, in its properties, name it this variable. Put the field on the report where you want the user-chosen date to appear.

2) Assign the user-selected date to the date var, in your code, and include this var in the SQL, e.g.

... Where MYTABLE.DateToFilterOn = ldUserSelDate ...

The user, of course, enters the date in a field on your report selection form.

HTH

Terry
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform