VERSION 5.00
Object = "{00025600-0000-0000-C000-000000000046}#5.2#0"; "crystl32.ocx"
Begin VB.Form FImpresion 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "Impresión"
   ClientHeight    =   2340
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   3225
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2340
   ScaleWidth      =   3225
   StartUpPosition =   3  'Windows Default
   Begin Crystal.CrystalReport CrDepositoC 
      Left            =   0
      Top             =   1320
      _ExtentX        =   741
      _ExtentY        =   741
      _Version        =   348160
      PrintFileLinesPerPage=   60
   End
   Begin VB.CommandButton CMD_CANCELAR 
      Cancel          =   -1  'True
      Caption         =   "Cancelar"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   735
      Left            =   1560
      Picture         =   "FImpresion.frx":0000
      Style           =   1  'Graphical
      TabIndex        =   4
      Top             =   1440
      Width           =   1335
   End
   Begin VB.CommandButton CMD_ACEPTAR 
      Caption         =   "Aceptar"
      Default         =   -1  'True
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   735
      Left            =   240
      Picture         =   "FImpresion.frx":030A
      Style           =   1  'Graphical
      TabIndex        =   3
      Tag             =   "R ASDASD"
      Top             =   1440
      Width           =   1305
   End
   Begin VB.Frame Frame1 
      Height          =   1215
      Left            =   120
      TabIndex        =   0
      Top             =   0
      Width           =   2895
      Begin VB.OptionButton OptImpresora 
         Caption         =   "Impresora"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   12
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   600
         TabIndex        =   2
         Top             =   600
         Width           =   1695
      End
      Begin VB.OptionButton OptPantalla 
         Caption         =   "Pantalla"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   12
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   600
         TabIndex        =   1
         Top             =   240
         Value           =   -1  'True
         Width           =   1815
      End
   End
End
Attribute VB_Name = "FImpresion"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public GintTodos As Integer
Public GstrClave As String
Private MUtilitarios As UTIL_SETUP.C_SETUP

Private Sub CMD_ACEPTAR_Click()
    
    Dim Lstrcadena As String

    CrDepositoC.ReportFileName = GstrReportesVta + "rpt_DepositoCorto.rpt"
    CrDepositoC.WindowTitle = "Reporte de Control de Depositos"
        
    CrDepositoC.Formulas(1) = "formusuario=stringvar strusuario; strusuario:='" & GCUSERID & "'"
    CrDepositoC.Formulas(2) = "formscreen=stringvar strscreen; strscreen:='05.120.00'"
        
    'crDeposito.Formulas(7) = "formNDMonto=" & GintDecResultado
        
                       
    If GintTodos = 1 Then
       Dim LrsDepositos As ADODB.Recordset
       Lstrcadena = "Select DEPOSITPASSWORD from OP_DEPOSITSITEDET where BATNBRDEPOSITSITE=" & FDepositos.lblNumero.Caption & _
                    " and SITEID='" & FDepositos.dtcAlmacen.BoundText & "' AND DATEPROCE='" & FDepositos.dtpFechaProc.Value & "'"
       
       Set LrsDepositos = MUtilitarios.Auxiliar3(Lstrcadena)
        
       If Not LrsDepositos.EOF Then
          LrsDepositos.MoveFirst
          Do While Not LrsDepositos.EOF
             
              CrDepositoC.StoredProcParam(0) = LrsDepositos!DEPOSITPASSWORD
              CrDepositoC.WindowState = crptMaximized
              CrDepositoC.WindowShowPrintSetupBtn = True
              
              If OptPantalla.Value = True Then
                 CrDepositoC.Destination = crptToWindow
              Else
                 CrDepositoC.Destination = crptToPrinter
              End If
              
              CrDepositoC.Action = 1
                           
              LrsDepositos.MoveNext
          Loop
       End If
        
    Else
       CrDepositoC.StoredProcParam(0) = GstrClave
       CrDepositoC.WindowState = crptMaximized
       CrDepositoC.WindowShowPrintSetupBtn = True
       
         If OptPantalla.Value = True Then
            CrDepositoC.Destination = crptToWindow
         Else
            CrDepositoC.Destination = crptToPrinter
         End If
       

       CrDepositoC.Action = 1
     
    End If

   
End Sub

Private Sub CMD_CANCELAR_Click()
    Unload Me
End Sub

Private Sub Form_Load()
    
     Me.Top = (Screen.Height - Me.Height) / 2
     Me.Left = (Screen.Width - Me.Width) / 2
    
    Set MUtilitarios = New UTIL_SETUP.C_SETUP
        
End Sub

Private Sub Form_Unload(Cancel As Integer)
  
    Set MUtilitarios = Nothing
  
End Sub

