I’m working on a .Net 4.0 web project that uses Microsoft RDLC Reporting framework with a local processing mode and my problem is I have to sort the tabular data with a dynamic column names string array parameter so when i researched on the internet(sorry i don't have the actual links for the research with me now) I found that I have this options.
I found on the internet that one can specify sorting fields in two ways on the sorting tab of tablix properties.
The First way is to Concatenate Fields using “&” on the first sorting fields using expression like this =Fields!Title.Value & Fields!EstimatedHours.Value This one will sort the data but it sorts Numbers as Strings meaning when you sort in an ascending order 250.00 will be always on the top of 3.6 I didn’t Test it on other data types like Date and so on but I’m sure it will result in the same thing.
The Second way that I found was to add a sort field expression textbox for every sort fields that I have on the Sort tab of Tablix Properties window like this.
On this way it will only sort the data on the first field that I gave it in the first textbox and it forget about the rest of the fields.
So my question is what am I missing here to make the above sorting work?
Thank you everybody in advance, and I hope I will fix the issue with your help. If it helps I’m using Visual Studio 2010 Ultimate Edition, RDLC Version 10, Entity Framework 5 and Object DataSourceControl with custom method which returns List of my custom objects to populate the report.
I solved my issue. The trick was specifying the sort columns in the RDLC file on the details group->group properties -> sorting tab rather than putting them on tablix properties -> sorting tab. That solved my issue perfectly. Hope it helps someone.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With