| Usuario |
Crystal Report Ayuda URGENTE !!! |
super-ariel
2 Mensaje(s)
|
| Enviado - 3/3/2003 |
| |
SQL = "SELECT * FROM Ventas WHERE NroFactura = " & NroFactura
'Creo o abro el recordset
Set Rs = DB.OpenRecordset(SQL)
'Guardar la factura en Ventas
Rs.AddNew
Rs("NroFactura") = txtNroFactura.Text
Rs("Fecha") = txtFecha.Text
Rs("FormaPago") = cboFormaPago.Text
Rs("CodCliente") = CodCliente
Rs("Total") = txtTotal.Text
Rs("Anulada") = "No"
Rs.Update
Private Sub GuardarDetalle(NroFactura As Long)
Dim Item As ListItem
'Abro el recordset
Set Rs = DB.OpenRecordset("DetalleVentas")
For Each Item In lvwDetalle.ListItems
Rs.AddNew
Rs("NroFactura") = NroFactura
Rs("CodProducto") = Item.Tag
Rs("Cantidad") = Item.SubItems(1)
Rs.Update
Next
'Cierro el recordset
rs.close
End Sub
Public Sub ImprimirFactura()
Dim Resp As Integer
Dim NroFactura As Long
SQL = "SELECT Max(NroFactura) as Max From Ventas"
Set Rs = DB.OpenRecordset(SQL)
NroFactura = Rs("Max")
Resp = MsgBox("¿Desea imprimir la factura?", vbYesNo, "Imprimir")
If Resp = vbYes Then
CR.Destination = crptToWindow
CR.DataFiles(0) = App.Path & "\Orlando.mdb"
CR.ReportFileName = App.Path & "\FacturaVenta.rpt"
CR.SelectionFormula = "{Ventas.NroFactura} = " & NroFactura & ""
CR.PrintReport
End If
End Sub
|
| |
|
fmarredo
486 Mensaje(s)
|
| Enviado - 4/3/2003 |
| |
| ¿Cuál es el problema? No probé el código pero no sé si te está dando error o qué le pasa. |
| |
|
super-ariel
2 Mensaje(s)
|
| Enviado - 4/3/2003 |
| |
| El problema es que el reporte aparece en blanco !!! :(((( |
| |
|