February 26, 2010 at 7:18 am
Hello,
I have a data set in a SSRS report that contains a value called county_id (int) and a name called county_name (varchar 50).
1, name1
2, name2
3, name3
etc . . .
Accessing the data set is a parameter that uses the
county_name as the label field and the county_id as it's value field.
I am creating an email that contains a link to generate this report with the following:
<a href="http://ccis.azdor.gov/ReportServer/?%2fData Management%2fNCC Data Validation Report&rs:Command=Render&rs:Format=PDF&County='
+ cast(@county_id as varchar(2)) + '&CompletedTasksOnly=True&ImportLogkey='
+ cast(@importlogkey as varchar(20)) + '&Severity=3">CLICK HERE</a>
which will ultimately produce the following
<a href="http://ccis.azdor.gov/ReportServer/?%2fData Management%2fNCC
Data Validation Report&rs:Command=Render&rs:Format=PDF&County=1&CompletedTasksOnly=True&ImportLogkey=3102&Severity=3">CLICK HERE</a>
Now to my question:
Is there a way I can use the county_name and not the county_id in my link to access the report. Changing the link to the county name gives me the error: "The value provided for the report parameter 'County' is not valid for its type. (rsReportParameterTypeMismatch)"
Now this totally makes sense because the value field for the parameter is the int value county_id.
However can I create some way of using the value OR the name for this parameter to access the report?
If anyone knows a way I could do this I would very much appreciate your insight.
Thanks!
February 26, 2010 at 11:16 am
No, but you can easily change the input parameter to a varchar, so that it will expect a name instead of an ID.
Andrew SQLDBA
February 26, 2010 at 11:35 am
Thanks for your response Andrew,
I believe I found another way to take care of the problem I was having.
Using some of our internal tables to store the URL string with #param# for the parameter value then I can use a replace of the #param# with the correct value from the data set. SSRS will get the right data type it expects to get and all will be good with the world.
Thanks again for your response.
May you have a productive day!:-)
Reana
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply