September 29, 2003 at 2:56 pm
I am tasked with building a report in Crystal Report V7 in which the vendor number is the main factor of the report. I have to do a parameter search where I can select either all vendors, a single vendor, or multiple vendors. I've never had a problem selecting all possible parameter values, or a single parameter value and I usually build that into my stored procedures. But to be able to select multiple vendors? Do I have to make my Vendor parameter in my stored procedure a cursor?
September 29, 2003 at 3:18 pm
Don't know Crystal, but, assuming this can be done in scope, use your front-end to insert the vendor numbers into a temporary table. Then have your SP use that table, e.g.:
SELECT v.Number, v.Name, v.City
FROM Vendors v JOIN #ReptVendors r ON v.Number = r.Number
ORDER BY v.Number
--Jonathan
--Jonathan
September 30, 2003 at 4:43 am
Also do not know Crystal that well, but you can try and pass the vendors as a comma delimited string to the sp.
September 30, 2003 at 8:08 am
If I already have the vendor numbers in a permanent table, why would I need to put them in a temporary table?
September 30, 2003 at 10:31 am
quote:
If I already have the vendor numbers in a permanent table, why would I need to put them in a temporary table?
The temporary table would contain only the vendors chosen for the report--the "multiple vendors" possibilty in your post. Then use an inner join to that table to restrict the result set to just those vendors (as in the example I posted).
--Jonathan
--Jonathan
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply