55 lines
1.6 KiB
Plaintext
55 lines
1.6 KiB
Plaintext
|
|
Imports System.Data
|
|
Imports Microsoft.Reporting.WebForms
|
|
Imports Extensiones
|
|
|
|
Partial Class RepImprimir
|
|
Inherits ClsPaginas
|
|
|
|
|
|
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
|
If Not Page.IsPostBack Then
|
|
Dim Reporte As String = IfNull(Request("Reporte"), "").ToString
|
|
If Reporte = "OC" Then
|
|
ImprimirOC(IfNull(Request("OC"), 0).ToString.ToEntero)
|
|
End If
|
|
End If
|
|
End Sub
|
|
|
|
|
|
Public Sub ImprimirOC(CveOC As Integer)
|
|
|
|
Dim dt As DataTable
|
|
Dim Solicita, Supervisa, Autoriza As String
|
|
Dim OC As New ClsOC
|
|
dt = OC.GetOrdenesDetalle(CveOC)
|
|
OC.GetOC(CveOC)
|
|
Solicita = OC.NombreSolicita
|
|
Supervisa = OC.NombreSupervisa
|
|
Autoriza = OC.NombreAutoriza
|
|
OC.Dispose()
|
|
|
|
Dim rds As New ReportDataSource("DataSet1", dt)
|
|
|
|
RV.LocalReport.DataSources.Clear()
|
|
RV.LocalReport.DataSources.Add(rds)
|
|
RV.LocalReport.ReportPath = AppDomain.CurrentDomain.BaseDirectory & "\OC\Reportes\aa.rdlc"
|
|
RV.LocalReport.Refresh()
|
|
|
|
Dim paramList As New List(Of ReportParameter)
|
|
With paramList
|
|
' .Add(New ReportParameter("CveOrdenCompra", CveOC.ToString, True))
|
|
' .Add(New ReportParameter("FechaSolicitud", NowADS().ToShortDateString, True))
|
|
.Add(New ReportParameter("pSolicita", Solicita, True))
|
|
.Add(New ReportParameter("pSupervisa", Supervisa, True))
|
|
.Add(New ReportParameter("pAutoriza", Autoriza, True))
|
|
|
|
End With
|
|
|
|
RV.LocalReport.SetParameters(paramList)
|
|
|
|
DT.Dispose()
|
|
End Sub
|
|
|
|
End Class
|