Hi Guyz,
Actually we are using a ASP page to display a report in a such a way to export from Crystal Report 10 using VB6.0(DLL), reports are displayed in both PDF & Excel( to display in excel we r using a check box in asp) then thru below options it gets exported.
below code used to format in VB6.0(DLL)
Public Function reportconv(strFileType As String) As Variant
On Error GoTo ErrorHandler
Dim vntReturn(1) As Variant
If UCase(strFileType) = "PDF" Then
vntReturn(0) = CRExportFormatType.crEFTPo
rtableDocF
ormat
vntReturn(1) = ".pdf"
ElseIf UCase(strFileType) = "HTML" Then
vntReturn(0) = CRExportFormatType.crEFTHT
ML32Standa
rd
vntReturn(1) = ".html"
ElseIf UCase(strFileType) = "TXT" Then
vntReturn(0) = CRExportFormatType.crEFTTe
xt
vntReturn(1) = ".txt"
ElseIf UCase(strFileType) = "XLS" Then
vntReturn(0) = CRExportFormatType.crEFTTe
xt
vntReturn(0) = CRExportFormatType.crExcel
97(For this Excel 97 should be there?)
vntReturn(0) = CRExportFormatType.crExcel
data only
vntReturn(1) = ".xls"
End If
getFileTypeAndExtension = vntReturn
Exit Function
ErrorHandler:
Err.Raise Err.Number, Err.Source, Err.Description
End Function
NOw my doubt, is we are using MS-Excel 2002, when we try to export, it placing all the records in same column, we need to place all the data's in different columns in order to make the data clear visisble in excel format...enclosed a sample below too
Start Free Trial