Problem Export Crystal report to Excell - TechRepublic
General discussion
December 8, 2004 at 03:09 AM
nelk_w

Problem Export Crystal report to Excell

by nelk_w . Updated 21 years, 5 months ago

In my VB program I generate a crystal report and before it gets viewed I want to export it. So my coding does it. But the problem is after I exported the report the fields that have Currency values diplay differen different currency simbols.
one row displays the machine difaults ?, one row with $. Here I’m pasting a code that was used.If somebody knows what the cause and solutions pls. let me know
thanks

With mreport
.txtAmount.Left = .txtAmount.Left + 1000

‘ .FaMOUNT.CurrencySymbol = “?”
‘ .fCost.CurrencySymbol = “?”
‘ .FdISCOUNT.CurrencySymbol = “$” ‘ “?”
‘ .fProfit.CurrencySymbol = “?”
‘ .fNetamount.CurrencySymbol = “?”

With .ExportOptions

‘.UseReportDateFormat = True
.UseReportNumberFormat = True

‘.FormatType = crEFTExcel80 ‘crEFTCommaSeparatedValues commented the org
.FormatType = crEFTExcel50 ‘crEFTCommaSeparatedValues
.DestinationType = crEDTDiskFile
‘.DiskFileName = “C:\ReconciliationOfActualCostAndProfit” + Format(Date, “MMM”) + Format(Date, “DD”) + “.xls”

‘.ExcelUseWorksheetFunctions = True
.ExcelAreaType = crDetail
‘ .ExcelUseTabularFormat = True
‘ .ExcelUseWorksheetFunctions = True

End With
‘CDExport.DialogTitle = “Reconciliation of Actual Cost and Profit”
CDExport.InitDir = “C:”
CDExport.FileName = “C:\ReconciliationOfActualCostAndProfit” + Format(Date, “MMM”) + Format(Date, “DD”) + “.xls”
CDExport.ShowSave

.ExportOptions.DiskFileName = CDExport.FileName + “.xls” ‘”C:\ReconciliationOfActualCostAndProfit” + Format(Date, “MMM”) + Format(Date, “DD”) + “.xls”
.Export (False)

End With

This discussion is locked

All Comments