Wednesday, March 7, 2012

Question on dynamic sorting

Hi,
I am trying to implement dynamic sorting using Reporting Services. I have 3
dropdowns on a page which contain the list of fields returned by a
stored procedure. What I am doing is creating the <Sorting> tag and its
children dynamically based on the sort the user selected. Then I am loading
the report definition (.rdl) into an Xml doc and I am adding the dynamically
created <Sorting> string to the doc at the appropriate location in the
document as if I had added sorting to the report using the Visual Studio IDE.
Then I turn the Xml doc into Byte[] and I am using this updated Byte[] array
to update the report definition. The problem is when I render the report
using the Render method, sorting does not take place as if the original .rdl
is used instead of the one I updated? Is there a way to dynamically deploy
the updated report definition? Is caching the culprit? Am I missing a step?
Is there a simpler way to implement dynamic sorting using RS?
Thanks muchyou could use the parameter "value" to drive the sorting for your table or
list. Under the sort properties, use =Fields(Parameters!SortBy.Value).Value
to have dynamic sorting.
"ISGADMIN" wrote:
> Hi,
> I am trying to implement dynamic sorting using Reporting Services. I have 3
> dropdowns on a page which contain the list of fields returned by a
> stored procedure. What I am doing is creating the <Sorting> tag and its
> children dynamically based on the sort the user selected. Then I am loading
> the report definition (.rdl) into an Xml doc and I am adding the dynamically
> created <Sorting> string to the doc at the appropriate location in the
> document as if I had added sorting to the report using the Visual Studio IDE.
> Then I turn the Xml doc into Byte[] and I am using this updated Byte[] array
> to update the report definition. The problem is when I render the report
> using the Render method, sorting does not take place as if the original .rdl
> is used instead of the one I updated? Is there a way to dynamically deploy
> the updated report definition? Is caching the culprit? Am I missing a step?
> Is there a simpler way to implement dynamic sorting using RS?
> Thanks much

No comments:

Post a Comment