Visual Basic - Abrir .rpt Externo en VB6.0

Life is soft - evento anual de software empresarial
 
Vista:

Abrir .rpt Externo en VB6.0

Publicado por Jonathan (23 intervenciones) el 27/01/2009 21:14:49
Hola a todos!! Espero que la pasen bien!
sabe alguien como abrir un archivo de Crystal Reports 8.5 externo, dentro de una aplicación de Visual Basic 6.0? Trabajo con Crystal Reports 8.5 Developer Edition.

De antemano muchas gracias amigos y amigas!
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:Abrir .rpt Externo en VB6.0

Publicado por Angel (21 intervenciones) el 27/01/2009 21:35:50
por ejemplo al terminar una factura:

Data1.RecordSource = "SELECT idfactura FROM facturas WHERE idusuario = " & principal.usuario.Caption & " ORDER BY idfactura DESC"
Data1.Refresh

'If msgyn("Desea Imprimir la factura?") = True Then Call reportes("rfacturas.rpt", "Reporte de Facturas", "{q.idfactura} = " & Data1.Recordset!idfactura, True, , False)
Call reportes("rfacturas.rpt", "Reporte de Facturas", "{q.idfactura} = " & Data1.Recordset!idfactura, True, , False)

la funcion reportes pegala en un module

Public Function reportes(rnombre As String, title As String, seleccion As String, Optional ByVal ip As Boolean = False, Optional ByVal zoom As Integer = 100, Optional ByVal page As Boolean = True)

'ip = False (Para el preview)

frmAbout.Report.DiscardSavedData = True
frmAbout.Report.ReportFileName = App.Path + "RPT" + rnombre
If page = True Then
frmAbout.Report.printername = pgde
frmAbout.Report.PrinterDriver = driverg
frmAbout.Report.PrinterPort = puertog
Else
frmAbout.Report.printername = ppeq
frmAbout.Report.PrinterDriver = driverp
frmAbout.Report.PrinterPort = puertop
End If
frmAbout.Report.Connect = "Dsn=" & base & ";UID=usersql;Pwd=i2osietnq;DBQ=" & base
frmAbout.Report.WindowTitle = title
frmAbout.Report.WindowState = crptMaximized
frmAbout.Report.SelectionFormula = seleccion
If ip = True Then
frmAbout.Report.Destination = crptToPrinter
Else
frmAbout.Report.Destination = crptToWindow
End If

frmAbout.Report.Action = 1
If ip = False Then
frmAbout.Report.PageZoom zoom
End If

End Function

eso es todo
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar