Me ayudan con mi reporte?
Publicado por Albertico (1 intervención) el 26/07/2007 23:35:16
gracias cuates por leer mi solicitud: estoy utilizando Visual 6 y el crystal pro, que vienen con él. tengo un reporte llamado datosgen1.rpt, y un formulario con un command llamado imprimir, le coloco las instrucciones siguientes y no me funciona:
'On Error Resume Next ---- - desde aquí ya me da error por eso lo anulé
Dim strCadena As String
---------------------------------------------
Private Sub Form_Load()
End Sub
----------------------------------------------
Private Sub imprimir_Click()
If txt_cuenta <> "" Then
'Agregando al filtro al area
If strCadena <> "" Then
strCadena = strCadena & " and "
End If
strCadena = strCadena & "{totales.newmatricula} = " & txt_matricula
mdiPrincipal.Reporte.SelectionFormula = strCadena
mdiPrincipal.Reporte.Destination = crptToPrinter
mdiPrincipal.Reporte.DataFiles(0) = "C:\encanto\integrl.mdb"
mdiPrincipal.Reporte.WindowTitle = "NÓMINA PRINCIPAL"
mdiPrincipal.Reporte.WindowState = crptMaximized
mdiPrincipal.Reporte.ReportFileName = "C:\encanto\rpt\datosgen1.rpt"
mdiPrincipal.Reporte.Action = 1
Else
MsgBox "por favor Llene todos los campos", vbOKOnly
End If
mdiPrincipal.Reporte.SelectionFormula = ""
mdiPrincipal.Reporte.Destination = crptToPrinter
mdiPrincipal.Reporte.DataFiles(0) = "C:\encanto\integrl.mdb"
mdiPrincipal.Reporte.WindowTitle = "NÓMINA PRINCPAL"
mdiPrincipal.Reporte.WindowState = crptMaximized
mdiPrincipal.Reporte.ReportFileName = "C:\encanto\rpt\datosgen1.rpt"
mdiPrincipal.Reporte.Action = 1
End Sub
el mensaje que me sale es el de la instrucción "por favor llene todos los campos", casi me rajo la cabeza pensando en que fallé y no encuentro, por favor si alguien me ayuda le agradecería muchísimo.
'On Error Resume Next ---- - desde aquí ya me da error por eso lo anulé
Dim strCadena As String
---------------------------------------------
Private Sub Form_Load()
End Sub
----------------------------------------------
Private Sub imprimir_Click()
If txt_cuenta <> "" Then
'Agregando al filtro al area
If strCadena <> "" Then
strCadena = strCadena & " and "
End If
strCadena = strCadena & "{totales.newmatricula} = " & txt_matricula
mdiPrincipal.Reporte.SelectionFormula = strCadena
mdiPrincipal.Reporte.Destination = crptToPrinter
mdiPrincipal.Reporte.DataFiles(0) = "C:\encanto\integrl.mdb"
mdiPrincipal.Reporte.WindowTitle = "NÓMINA PRINCIPAL"
mdiPrincipal.Reporte.WindowState = crptMaximized
mdiPrincipal.Reporte.ReportFileName = "C:\encanto\rpt\datosgen1.rpt"
mdiPrincipal.Reporte.Action = 1
Else
MsgBox "por favor Llene todos los campos", vbOKOnly
End If
mdiPrincipal.Reporte.SelectionFormula = ""
mdiPrincipal.Reporte.Destination = crptToPrinter
mdiPrincipal.Reporte.DataFiles(0) = "C:\encanto\integrl.mdb"
mdiPrincipal.Reporte.WindowTitle = "NÓMINA PRINCPAL"
mdiPrincipal.Reporte.WindowState = crptMaximized
mdiPrincipal.Reporte.ReportFileName = "C:\encanto\rpt\datosgen1.rpt"
mdiPrincipal.Reporte.Action = 1
End Sub
el mensaje que me sale es el de la instrucción "por favor llene todos los campos", casi me rajo la cabeza pensando en que fallé y no encuentro, por favor si alguien me ayuda le agradecería muchísimo.
Valora esta pregunta


0