Crystal Report - Problema al exportar a excel desde Crystal Report

 
Vista:

Problema al exportar a excel desde Crystal Report

Publicado por Pablo Umana (3 intervenciones) el 19/05/2007 05:17:28
Tengo el siguiente problema: Genero un reporte desde Visual Basic 6.0 con Crystal Report 8,5 en el cual se muestra el detalle con sus sub totales y el titulo del informe.
El problema que tengo es que cuando exporto a excel me salen los titulos de las columnas corridos,
el detalle corrido y los sub totales salen mal. ¿Alguien sabe como exportar a excel sin perder el formato
que se establece en el informe Crystal?

Estare profundamente agradecido,
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:Problema al exportar a excel desde Crystal Repo

Publicado por hj (1 intervención) el 29/05/2007 14:59:05
Amigo disculpa como te conectas desde vb con crystal report? como le dices a crystal desde vb que datos son los que quieres mostrar y como te los devuelve por fa
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

RE:Problema al exportar a excel desde Crystal Repo

Publicado por Pablo Umana (3 intervenciones) el 30/05/2007 04:09:43
La forma en que me conecto es la siguiente o mas bien te envio el codigo con que lo realizo, y ademas le envio algunos parametros segun sea el reporte....(rptParametros: es el componente de Crystal)



rptParametros.Connect = "DSN=" & m_Coneccion.NombreServidor & ";" & "UID=" & m_Coneccion.CodigoUsuarioSQL & ";" & "PWD=" & m_Coneccion.ClaveUsuarioSQL & ";"
rptParametros.DiscardSavedData = True
rptParametros.ReportFileName = strRutaBaseDatos & "InventarioProveedor.rpt"
rptParametros.Formulas(0) = "Compania= '" & m_Compania.Nombre & "'"
rptParametros.Formulas(1) = "Usuario= '" & General.RegIdentificacion.IDMaquina & "'"
rptParametros.Formulas(2) = "TipoCambio = " & mskTipoCambio
rptParametros.Formulas(4) = "FechaIni= '" & dtpFechaIni & "'"
rptParametros.Formulas(5) = "FechaFin= '" & dtpFechaFin & "'"
If optAcumulado.Value Then
rptParametros.Formulas(3) = "Resumen = 'S'"
Else
rptParametros.Formulas(3) = "Resumen = 'N'"
End If
rptParametros.WindowState = crptMaximized

strSeleccion = "{INV_INVENTARIO.CIA_Codigo} = '" & m_Compania.Codigo & "'"


If cboClasificacion.Text <> "" Then
strSeleccion = strSeleccion & IIf(strSeleccion = "", "", " AND ") & "{INV_INVENTARIO.CLA_Codigo} = '" & cboClasificacion & "'"
End If

If lblBodega <> "" And m_strBodega <> "" Then
strSeleccion = strSeleccion & IIf(strSeleccion = "", "", " AND ") & "{INV_X_BODEGA.BOD_Bodega} = '" & m_strBodega & "'"
End If

If lblDepto <> "" And m_strDepto <> "" Then
strSeleccion = strSeleccion & IIf(strSeleccion = "", "", " AND ") & "{INV_INVENTARIO.DEP_Codigo} = '" & m_strDepto & "'"
End If

If lblFamilia <> "" And m_strFamilia <> "" Then
strSeleccion = strSeleccion & IIf(strSeleccion = "", "", " AND ") & "{INV_INVENTARIO.FAM_Codigo} = '" & m_strFamilia & "'"
End If

If lblProve <> "" And m_strProve <> "" Then
strSeleccion = strSeleccion & IIf(strSeleccion = "", "", " AND ") & "{INV_INVENTARIO.Pro_Codigo} = '" & m_strProve & "'"
End If

If lblArticulo.Caption <> "" And m_strArticulo <> "" Then
strSeleccion = strSeleccion & IIf(strSeleccion = "", "", " AND ") & "{INV_X_BODEGA.INV_CODIGO} = '" & m_strArticulo & "'"
End If
'
' If chkDesactivarCodigo.Value = 1 Then
' strSeleccion = strSeleccion & IIf(strSeleccion = "", "", " AND ") & "{INV_INVENTARIO.INV_Desactivado} =1 "
' rptParametros.Formulas(4) = "Titulo = '" & "Artículos Desactivados" & "'"
' Else
' strSeleccion = strSeleccion & IIf(strSeleccion = "", "", " AND ") & "{INV_INVENTARIO.INV_Desactivado} = 0 "
' rptParametros.Formulas(4) = "Titulo = '" & "Artículos Activados" & "'"
' End If

'
' strSeleccion = strSeleccion & IIf(strSeleccion = "", "", " AND ") & "{INV_X_BODEGA.INV_Disponible} > 0"

' /* Da como opcion de imprimir saldos < menor cero o > mayor a cero */
If chkSaldo.Value = 1 Then
strSeleccion = strSeleccion & IIf(strSeleccion = "", "", " AND ") & "({INV_INVENTARIO.INV_DISPONIBLE}<>0 OR " & _
"{INV_INVENTARIO.INV_DISPONIBLE} <> 0) "
End If

rptParametros.ReplaceSelectionFormula strSeleccion
rptParametros.WindowShowPrintSetupBtn = True
rptParametros.WindowShowSearchBtn = True
rptParametros.Action = 1
chkDesactivarCodigo.Value = 0
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