I'm using the version of CR that comes bundled with vs.net and I am writing a web application.
I have added a hyperlink to one of the column headers in my report such that when the user clicks on this header all the rows in the group are sorted. This works fine as long as I am on the first page of my report. If I try to sort by column when I'm on a subsequent page, my code refreshes
back to the first page of the report. How do stay on the same page?
Here's what I'm doing:
//where cr is my reportdocument and ds is my dataset
cr.SetDataSource (ds);
FieldDef = cr.Database.Tables [0].Fields [10];
cr.DataDefinition.SortFields [1].Field = FieldDef;
cr.DataDefinition.SortFields [1].SortDirection = SortDirection.DescendingOrder;
CrystalReportViewer1.ReportSource = cr;
CrystalReportViewer1.RefreshReport();
Thanks
Phil
I have added a hyperlink to one of the column headers in my report such that when the user clicks on this header all the rows in the group are sorted. This works fine as long as I am on the first page of my report. If I try to sort by column when I'm on a subsequent page, my code refreshes
back to the first page of the report. How do stay on the same page?
Here's what I'm doing:
//where cr is my reportdocument and ds is my dataset
cr.SetDataSource (ds);
FieldDef = cr.Database.Tables [0].Fields [10];
cr.DataDefinition.SortFields [1].Field = FieldDef;
cr.DataDefinition.SortFields [1].SortDirection = SortDirection.DescendingOrder;
CrystalReportViewer1.ReportSource = cr;
CrystalReportViewer1.RefreshReport();
Thanks
Phil