Hello,
I have the following very simple piece of code:
ReportDocument ReportDoc = new ReportDocument();
string sReportFile = this.Server.MapPath("~/Reports/catalogue.rpt");
ReportDoc.Load(sReportFile);
ReportDoc.SetDataSource((DataTable) dtCatalogue);
rpvCatalogue.ReportSource = ReportDoc;
rpvCatalogue is just a CrystalReportViewer used to display the report on a web page. What I want
is to programmatically change the sort order of the report's DataTable (dtCatalogue).
I have tried this:
dtCatalogue.DefaultView.Sort = "title desc";
but it does not work. Titles still appear on my report in ascending, not descending order.
Any help will be greatly appreciated!