Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

RefreshReport

Status
Not open for further replies.

oxenberg

Programmer
Jul 1, 2002
28
US
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top