Return the sorted data in a dataset and display them in a form

0

I have a dataset that returns this data sorted by the uds column in descending form as shown in the example

The problem I have when filling in the dataset to pass it to the reportviewer I do it in this way, the data do not leave me sorted descendingly by the field uds

      private void frmVentasTop10_Load(object sender, EventArgs e)
    {
        this.ventasLiniasTableAdapter.obtenerLiniasOrdenadasPorUnidades(this.dSVentasLinias.VentasLinias, pFechaInicio, pFechaFin);
        try
        {
            ReportParameter p1 = new ReportParameter("proveedor", pProveedor.ToString());
            this.reportViewer1.LocalReport.SetParameters(p1);
            this.reportViewer1.RefreshReport();
        }

This returns me the report with the data but it does not order me through the column "uds" in a descending way, the result by screen is this

In the properties of the table " tablix " I have to sort through the uds field but it does not.

Thank you,

    
asked by ilernet 15.06.2017 в 12:02
source

1 answer

0

With what little can be observed I guess you are ordering it by Código de Artículo , and that is considering it as a string, that's why 10 at the beginning of the list. What I do (I do not know how advisable it is) is to sort the data from the query, so in the view there is nothing to order anything.

    
answered by 23.06.2017 в 19:49