Visual Basic - Flexgrid + Crystal Report

Life is soft - evento anual de software empresarial
 
Vista:

Flexgrid + Crystal Report

Publicado por Alex (3 intervenciones) el 08/06/2002 21:07:15
Hola, tengo un formulario en el que tengo varios flexgrid donde capturo datos de una base de datos. Como creo un reporte con Crystal report con los datos que tengo en el Flexgrid del formulario.?.....Uso bd Sql......
Gracias
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:Flexgrid + Crystal Report

Publicado por carla (104 intervenciones) el 11/06/2002 01:04:14
AL REPORTE TU LE PUEDES MARDAR DATOS A TRAVES DE FORMULAS COMO DE QUERYS ACA TE MANDO UN EJEMPLO EN SQL

ESTA ES LA CONEXION EN VISUAL
Private Sub Definir_Conexion()
Private Sub Definir_Conexion()
CrystalReport1.Connect = "UID=" + Gl_Usuario + ";PWD=" + Gl_Pass + ";Data Source=" + GL_Base_BD
CrystalReport1.ReportFileName = Gl_Reportes + "PV_L13.rpt"
End Sub

LUEGO EN EL CRUSYAL DEBES CREAR EL RPT Y DECIRLE QUE VAS A USAR UN PROVEEDOR DE DATOS SQL AHI TE CONECTAS A LA BASE Y AGREGAS LAS TABLAS QUE NECESITAS

LUEGO EN EL VISUAL LE PASAS EL QUERY

Private Sub bo_editar_Click()
On Error GoTo ERRORCONEXION
MousePointer = 11
pasar_parametros
If Sw_datos Then
CrystalReport1.Destination = crptToWindow
CrystalReport1.Action = 1
End If
MousePointer = Default
Exit Sub

ERRORCONEXION:
MsgBox Err.Description & " Nº de error = " & Err.Number
Exit Sub
End Sub


Private Sub pasar_parametros()
lin = 0: Mquery = " "
Mquery = "Select * From usuarios, accesos, programa where usuarios.identifi = accesos.identifi and "
Mquery = Mquery + "programa.nombrepr = accesos.nombrepr order by usuarios.identifi "
Set cmd = New Command
cmd.CommandText = Mquery
cmd.CommandType = adCmdText
Set cmd.ActiveConnection = C_Gescom
Set rsPrograma = cmd.Execute
lin = rsPrograma.RecordCount
If lin = 0 Then
MsgBox "No Se Encontrarón Datos en la Búsqueda", vbInformation, "Error en la B%F
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