I'm currently trying to create a report that will take three parameters in the URL to generate a report: year, month, and day. The report is using an analysis services data source in RS 2005. Now, my problem is that the parameters being passed in the URL are not being selected in the drop down boxes for the parameters. The report does not throw any exceptions, and after the user selects values for the year, month, and day everything generates successfully.
Here is the URL format I am trying: http://localhost/ReportServer?/FolderName/ReportName&rs:Command=render&Year=2006&Month=6&Day=9
Currently, my parameters are all set to null for default values. They are also not multivalued, not internal, not hidden, don't allow blank, and don't allow null. I have also looked through the valid values in the drop down box for each parameter and verified that the values I supplied in the URL do exist. Also, the data types for each parameter is Integer just like the data type found in the database.
In my opinion, this problem seems directly related to using an analysis services data source. After I was getting this problem, I created a sample report using SQL Server data source, used the same three parameters, and passed them in the URL. Everything on that report worked perfectly.
Please help, I've looked thorugh almost every piece of documentation regarding parameters for Reporting Services and still no luck. Thanks!!
Are you sure those are the names of the parameters and not the prompts?
You can view the parameter names in Report Manager.
|||These are the correct names of the parameters. The prompt names match the actual parameter names.|||Can you post the portion of the RDL which defines the parameters?
Also make sure that the value you are assigning is really a proper value, and not the label for a proper value.
|||Actually, I just figured out the problem...
When you are working with an analysis services data source, the parameter values are different from the values listed in the database.
For example, suppose you need the parameter CalendarYear. In the database the values are 2004, 2005, 2006, etc... However, in reporting services the parameter values are actually [DimensionName].[FieldName].&[value] ... or ..... [Date Dim].[CalendarYear].&[2006]
In case you are ever unclear of a parameter value for something, just go to the "Data" tab, click the Dataset for the parameter, ie. "CalendarYear". Then click out of the Design View. Finally, click the execute query button and observe the values listed in the parameter value column. These are the list of valid values which can be used.
As a side note, when adding these parameter values in a URL, you will need to escape the ampersand character in the value expression otherwise it won't work. For example, CalendarYear=[Date Dim].[CalendarYear].%26[2006]
I hope this helps everyone. I know I spent a lot of time working on this.
Thanks!!
|||i am not sure about the answer given above as the correct date time format to acess in url is
Code Snippet
YYYY-MM-DDTHH:MM:SS
And the report that is created above is defalut to query type that should not be right
bye
arya|||
I'm experiencing a similar problem, with a special character in the FieldName part of the parameter:
Someting like:
CalendarYear=[Date Dim].[Calendar ?Year].%26[2006]
I've already tried escaping the ? and characters:
CalendarYear=[Date Dim].[Calendar %abYear%bb].%26[2006]
Any ideas ?
sql
No comments:
Post a Comment