Greetings!
I have 4 datasets in a report. One of them (not the main dataset) has a field I need to set as a searchable parameter. In this case, it's an account code.
How can I set up my parameters to only return account codes that match what the user inputs?
Example:
Dataset1 has an Order Number and some general info (like fiscal year)
Dataset2 has an Order Number and some dollar amounts
Dataset3 has as Order Number and Org codes (what I need to filter on)
Dataset4 has an Order Number and some information about the vendors we're paying (location, etc.)
I've inner joined all of them on the Order Number.
When I try this:
SELECT DISTINCT
purch_order_num
, org_code as Org
, object_code as Obj
FROM dataset3
WHERE org_code = (@orgCode)
...this returns ALL of the same data I had before (no filtering), but now every single Org code value is blank. If I enter 999 as the @orgCode, it returns all the values from all the tables -- except it deletes the columns with Org codes.
What can I do to create a parameter that filters across all of the tables and only returns the lines with the correct Org codes.
Thanks!