en el reporte de sabana de venta mostrar solo el año actual y 5 anteriores

This commit is contained in:
HECTOR RODRIGUEZ
2021-02-24 11:18:38 -07:00
parent 943a69b4b6
commit b8beb159ba

View File

@@ -1197,7 +1197,7 @@ Public Class ClsAcumuladores
Public Function GetAñosVentas(CveEmprea As Integer) As Boolean
Dim Retorno As Boolean = False
SqlDataAdapter(String.Format("select year(Fecha) as Año from Ventas where CveEmpresa = {0} group by year(Fecha) Order by year(Fecha)", CveEmprea.ToString), CommandType.Text)
SqlDataAdapter(String.Format("select top 6 year(Fecha) as Año from Ventas where CveEmpresa = {0} group by year(Fecha) Order by year(Fecha) desc", CveEmprea.ToString), CommandType.Text)
Try
SqlAdapter.Fill(Data)