pmartin73
asked on
VB/Crystal Reports 9/CSV Export
Using the Crystal automation objects (CRAXDRT), I'm trying to export a detail-only [headers and footers suppressed] report created in Crystal 9. The desired file format is character-separated value with a comma as the field delimiter and nothing as the string delimiter. When I attempt this using the following code, a comma is used for both the field and string delimiter, resulting in 3 commas between each field (,Field1,,,Field2,,,Field3 ,)
Set oExport = MyReport.ExportOptions
oExport.Reset
oExport.FormatType = crEFTCommaSeparatedValues
oExport.CharFieldDelimiter = ","
oExport.CharStringDelimite r = ""
oExport.DestinationType = crEDTDiskFile
oExport.DiskFilename = "C:\MyFile.txt"
MyReport.Export False
The report exports fine from the IDE.
Thanks,
Patrick Martin
Set oExport = MyReport.ExportOptions
oExport.Reset
oExport.FormatType = crEFTCommaSeparatedValues
oExport.CharFieldDelimiter
oExport.CharStringDelimite
oExport.DestinationType = crEDTDiskFile
oExport.DiskFilename = "C:\MyFile.txt"
MyReport.Export False
The report exports fine from the IDE.
Thanks,
Patrick Martin
Try this:
oExport.CharStringDelimite r = Chr(34)
oExport.CharStringDelimite
oExport.CharStringDelimite r = """"
mlmcc
mlmcc
I guess we all have the same idea going here.
pmartin73:
This old question needs to be finalized -- accept an answer, split points, or get a refund. For information on your options, please click here-> http:/help/closing.jsp#1
Experts: Post your closing recommendations! Who deserves points here?
This old question needs to be finalized -- accept an answer, split points, or get a refund. For information on your options, please click here-> http:/help/closing.jsp#1
Experts: Post your closing recommendations! Who deserves points here?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
pmartin73:
This old question needs to be finalized -- accept an answer, split points, or get a refund. For information on your options, please click here-> http:/help/closing.jsp#1
EXPERTS:
Post your closing recommendations! No comment means you don't care.
This old question needs to be finalized -- accept an answer, split points, or get a refund. For information on your options, please click here-> http:/help/closing.jsp#1
EXPERTS:
Post your closing recommendations! No comment means you don't care.
If you want to get a refund for this question, post a zero-point question in https://www.experts-exchange.com/Community_Support/
Subject: Moderator Please Refund Points
Body: Please PAQ/Refund this question:
https://www.experts-exchange.com/questions/20541645/VB-Crystal-Reports-9-CSV-Export.html
Reason: I answered the question myself
Subject: Moderator Please Refund Points
Body: Please PAQ/Refund this question:
https://www.experts-exchange.com/questions/20541645/VB-Crystal-Reports-9-CSV-Export.html
Reason: I answered the question myself
pmartin73, an EE Moderator will handle this for you.
Moderator, my recommended disposition is:
Refund points and save as a 0-pt PAQ.
DanRollins -- EE database cleanup volunteer
Moderator, my recommended disposition is:
Refund points and save as a 0-pt PAQ.
DanRollins -- EE database cleanup volunteer
Dabas