Hello all! I have a report to be rendered in PDF format. On the report is a
list. I'm trying to dynamically change the sort direction of my list sorting
at run time, depending upon what parameter value is passed into the report
i.e. ascending or descending. Is this possible? I've tried editing my rdl
code numerous ways along these lines but it throws up an error no matter what:
<SortBy>
<SortExpression>Fields!sortby2.Value</SortExpression>
<Direction>=iif(Parameters!sortdir.Value = "Asc", Ascending,
Descending)</Direction>
</SortBy>
Any guidance would be greatly appreciated - either in doing it this way or
some other.
Thanks,
DaveDave,
I used this and it worked for me. I use two parameters, one telling
direction, one telling what column to sort by.
=iif(Parameters!Direction.Value="Ascending" AND
Parameters!SortBy.Value="quantity",Fields!quantity.Value, 0)
Put this in one column, and select Ascending in the other column.
"Dave" <Dave@.discussions.microsoft.com> wrote in message
news:Dave@.discussions.microsoft.com:
> Hello all! I have a report to be rendered in PDF format. On the report is
> a
> list. I'm trying to dynamically change the sort direction of my list
> sorting
> at run time, depending upon what parameter value is passed into the report
> i.e. ascending or descending. Is this possible? I've tried editing my rdl
> code numerous ways along these lines but it throws up an error no matter
> what:
> <SortBy>
> <SortExpression>Fields!sortby2.Value</SortExpression>
> <Direction>=iif(Parameters!sortdir.Value = "Asc", Ascending,
> Descending)</Direction>
> </SortBy>
> Any guidance would be greatly appreciated - either in doing it this way or
> some other.
> Thanks,
> Dave
2 comments:
It is not working for me, I have tried it like
=iif(Parameters!Direction.Value="Ascending"
AND
Parameters!SortBy.Value="quantity",Fields!quantity.Value, 0)
It is not working for me, I have tried it like
=iif(Parameters!Direction.Value="Ascending"
AND
Parameters!SortBy.Value="quantity",Fields!quantity.Value, 0)
Post a Comment