I am using microsoft report开发者_高级运维ing 2008 and I would like to set parameters in this report. I do not want to pull back a list that contains the same...such as year...I pull up my parameter and I have a hundred 2010...I just want one to appear in the parameter but I want my report to show all hundred. How do I do this?
I'm guessing you want to base your parameter selection on a query of available values that will appear in your report, so you have hooked it up to your dataset for your report.
Create another dataset that is like your report dataset but only returns distinct values and use this as the query for available parameter values.
For example, if your report dataset is something like this:
SELECT Year, Amount
FROM MyTable
WHERE SomeValue = 1
use the following dataset for your parameter query:
SELECT DISTINCT Year
FROM MyTable
WHERE SomeValue = 1
精彩评论