PDA

Click to See Complete Forum and Search --> : Parameters for data reports


Rohan_Powle
Mar 13th, 2000, 04:38 PM
Hi Friend...

can u pls tell me how to pass parameters for data reports
-> Data between to dates
-> data with all names starting with "a" etc....

If u can pls give me a code for this problem i'll
be greatfull..........

--Rohan

Forest Dragon
Mar 16th, 2000, 05:53 PM
Follow these steps:

1. Create the Command object.

2. Fill the SQL sentence. Use the "?" character instead of the parameters.
Example: SELECT * FROM Customers WHERE CustomerID=?

3. Now click the parameters tab. You will see all your parameters. You cannot add or delete parameters to the list because it counts on the SQL sentence, but you can change their names.

4. Build the DataReport and bind it to the Command object.

5. Before you display the DataReport, you need to run the Command object and give it the values of the parameters. Example: DataEnvironment1.Command1 Parameter1,Parameter2, …
You should build a form that will let the user fill the values.

6. Now you can display your DataReport by using DataReport1.Show

Good Luck!!!