Ver Mensaje Individual
  #6 (permalink)  
Antiguo 04/05/2005, 18:10
blascota
 
Fecha de Ingreso: mayo-2005
Mensajes: 9
Antigüedad: 19 años
Puntos: 0
Para que te des una idea te voy a pegar un pequeño código que utilizo para desplegar mis reportes.

With MDIForm1.CrystalReport1
.Reset
.DataFiles(0) = MDIForm1.ruta
.ReportFileName = "c:\Archivos de programa\mastersoft\rptFactura.rpt"
.PrinterName = MDIForm1.facturas_final
.PrinterSelect
.Formulas(0) = "strNombreCliente = '" & txtnombre(1) & "'"
.Formulas(1) = "strDireccion = '" & txtdireccion(1) & "'"
.Formulas(2) = "strCiudad = '" & txtciudad(2) & "'"
.WindowShowPrintSetupBtn = True
.WindowShowCloseBtn = True
.WindowShowSearchBtn = True
.WindowParentHandle = MDIForm1.hWnd
.WindowState = crptMaximized
If preview = True Then
.Destination = crptwindow
Else
.Destination = crptToPrinter
.CopiesToPrinter = numerodecopias
End If
'On Error GoTo error
.Action = 1
End With
Exit Function
'error:
' cnn.Execute ("DELETE FROM PARAIMPRIMIR")
' MsgBox "Ha ocurrido un error al imprimir", vbInformation, "Información"
' Exit Function
End Function