By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,620 Members | 1,303 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,620 IT Pros & Developers. It's quick & easy.

Creating query that allows user to choose criteria to be used in one or another field

P: 1
I am new to reporting services 2005 (reporting in Access for years and older versions of Reporting Services from time to time) and this is probably a dumb question... but I have no internal resources since I am the first to use it so... here you go:

I have a report I am trying to recreate, the old one is in a PowerBuilder app and the author is no longer with company. The majority of the report is straightforward, but I am really hung up on one thing.

Basically the user has a "simple" choice, they can run the report based on the location where a vendor is based or they can run the report based on where the vendor's territory/coverage area is designated. I have the report working, but this parameter "swing" is causing me a ton of headaches.

I have parameters setup to allow the user to select a State, which then loads the Counties in that State for the user to choose from. What I want from there is:

-If user chose to run report based on location, then use their selections as filter criteria on the vendor table (which stores the vendor's address)
-If user chose to run based on location, then use their selections as filter criteria on the vendor territory table (seperate table that stores the vendors territory of coverage)

So, I want to use the same user input for State and County as criteria, but use it in one place or another based on their choice of running the report on Location or Coverage.

I have tried all sorts of scenarios and just cannot seem to nail it. I assume I need to use a high level OR that treats the Location/Coverage decision to only one set of criteria or the other, however, I have nothing in the db to assist me... so I am at a loss.

I have tried (Summary):
1. Adding the parameter as a field in the query with a Y for Coverage and a N for Location (maybe I am just adding it incorrectly?)
2. Adding dependencies on datasets related to both the State and County, but that did not work
3. Other things I have tried are probably not worth mentioning

I think I am close, but my in experience is costing me a lot of time, anything you can do to help would be appreciated.
Jun 12 '07 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.