Agregando nueva vista de reporte RepEntradasUsadosClientes
This commit is contained in:
@@ -1,9 +1,20 @@
|
||||
Imports Extensiones
|
||||
Imports System.Data
|
||||
Imports System
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class Acumuladores_RepEntradasUsadosClientes
|
||||
Inherits ClsPaginas
|
||||
|
||||
Private Property DatosEntradasUsadosClientes() As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DatosEntradasUsados"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DatosEntradasUsados") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Sub Acumuladores_EntradasUsados_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
|
||||
If Not Page.IsPostBack Then
|
||||
@@ -38,11 +49,44 @@ Partial Class Acumuladores_RepEntradasUsadosClientes
|
||||
Dim Acum As New ClsAcumuladores
|
||||
|
||||
If Acum.EntradasUsadosClientesRep(CveAlmacen, FechaI, FechaF, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
GvDatos.datasource = Acum.DtResultados
|
||||
GvDatos.DataSource = Acum.DtResultados
|
||||
DatosEntradasUsadosClientes = Acum.DtResultados
|
||||
End If
|
||||
|
||||
Acum.Dispose()
|
||||
GvDatos.databind
|
||||
GvDatos.DataBind()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
If e.Row.DBCampo("EsHeader").ToString = "-1" Then
|
||||
e.Row.CssClass = "SubTotales2"
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnImprimir_Click(sender As Object, e As EventArgs)
|
||||
|
||||
|
||||
Dim Dia As String = {"lunes", "martes", "miércoles", "jueves", "viernes", "sábado", "domingo"}(If((Weekday(Today) - 2) = -1, 7, Weekday(Today) - 2))
|
||||
Dim Mes As String = {"enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"}(Month(Today) - 1)
|
||||
|
||||
Dim FechaConFormato As String = String.Format("{0}, {1} de {2} de {3}", Dia, Month(Today), Mes, Year(Today))
|
||||
|
||||
Dim params As New List(Of ReportParameter)
|
||||
|
||||
params.Add(New ReportParameter("Direccion", "asdfasdfasdf"))
|
||||
params.Add(New ReportParameter("FechaConFormato", FechaConFormato))
|
||||
params.Add(New ReportParameter("FechaInicial", TxtFechaI.Text))
|
||||
params.Add(New ReportParameter("FechaFinal", TxtFechaF.Text))
|
||||
|
||||
Dim rds As New ReportDataSource With {.Name = "DataSet1", .Value = DatosEntradasUsadosClientes}
|
||||
|
||||
ImprimirPDF(String.Format("Empresas/{0}/Formatos/RepEntradasUsadosClientes.rdlc", UsuarioActual.CveEmpresa), DatosEntradasUsadosClientes, params, "prueba", "PDF")
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user