C# --> Microsoft Report Viewer -- "SORT" order ?

finance_teacher
finance_teacher used Ask the Experts™
on
How can I get the below Microsoft Report Viewer to display the same "SORT" order as the user selected ?

1.      user runs Form1.cs

2.      below code runs
              **this.gML_ROITEMTableAdapter.FillBy_History(this.dataSet1.GML_ROITEM,...)

3.      user clicks on a CELL header (Description, StockNum,  Date, or something else)
              **example = user clicks "QtyRcvd" to sort in descending order (attached 1.jpg)

4.      user clicks PRINT

5.      attached unordered results display, without "QtyRcvd" sorted in descending order (attached 2.jpg)
              ** two .cs files attached
0001.jpg
0002.jpg
form.txt
print.txt
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Author

Commented:
Ok, how can I get the below "this.reportViewer1.Sort("ROM_ID");"
to work since this.reportViewer1.Sort() = "ROM_ID"; also failed ?
------------------------------------------------------------------------
 public RO_MatReq_History_Print(DateTime vStartDate, DateTime vEndDate, string vSTOCKNUM, string vROMID)
        {
            InitializeComponent();
            this.GML_ROITEMTableAdapter.FillBy_History(this.DataSet1.GML_ROITEM, vStartDate, vEndDate, Properties.Settings.Default.SettingsUserID, vSTOCKNUM, vROMID);
            //this.GML_ROITEMBindingSource.Sort = "ROM_ID";
            this.reportViewer1.RefreshReport();
            this.reportViewer1.Sort("ROM_ID");
        }

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial