Skip to Content
avatar image
Former Member

Crystal Report is not re-ordering properly

I have a complex report with a simple problem. It's not letting me change the original sort order. The report originally sorted by id which is how it was being returned from the stored procedure. The application now lets users sort the data by their personal custom order. I've modified the stored procedure (MS SQL) to do this and the data is now being sent in the correct order.

The report uses a DataTable (VS 2015) because it uses a lot of info and this is one of several tables that are being used. This is how the data source is being set.

DataTable dataTableSizing = sortedDataTable; Report.Database.Tables["Sizing"].SetDataSource(dataTableSizing);

The sortedDataTable's Rows are in the correct order but the report always prints the old way and does not "respect" the order being sent.

What am I missing? I'm fairly new to Crystal but this seems like this should be straight forward.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Feb 25 at 01:58 PM

    Make sure you didn't specify any sorting or grouping in the report design.
    Open the rpt in Crystal: Report, Record Sort Expert...

    Add comment
    10|10000 characters needed characters exceeded

  • Feb 23 at 09:34 PM

    Hi Jim,

    If you change data source you need to verify the report by the Edit Report and selecting Database, Verify.

    RPT file keep a copy of the DB/Field structure in it so if the source changes you need to Verify to update the report also.

    PS - to save you a lot of head aches don't change the dB structure once the report is finalized.

    Don

    Add comment
    10|10000 characters needed characters exceeded