RDLC Report - Ordering in date is not working

487 Views Asked by At

I am trying to implement ordering by date in rdlc report. The data is filtered on the basis of from date and to date. I have also added header on the top of the report as 'Month Name' Details(e.g. Nov Details) The date format of a column on which I am using order by is 'MM/dd'.

I am passing below parameters - From date -> 01-Nov-2020, To Date -> 28-Feb-2021 and I am getting data as Jan 2021, Feb 2021, Nov 2020, Dec 2020, which is wrong.

I want the output as Nov 2020, Dec 2020, Jan 2021, Feb 2021 and so on in the report.

I tried making changes in expressions and changed format in stored procedure also but its not working.

Please provide a solution.

1

There are 1 best solutions below

0
Naveen Kumar On

In a tablix data region, set the sort expression for the data region or for each group, including the details group.

use direct date field in sort expressions or use below expression

 =Cint(Format(Fields!DateField.Value, "yyyyMMdd"))