• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 425
  • Last Modified:

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.CharStringDelimiter = ""
        oExport.DestinationType = crEDTDiskFile
        oExport.DiskFilename = "C:\MyFile.txt"
        MyReport.Export False

The report exports fine from the IDE.

Thanks,
Patrick Martin
0
pmartin73
Asked:
pmartin73
  • 2
  • 2
  • 2
  • +3
1 Solution
 
DabasCommented:
What happens if you set oExport.CharStringDelimiter to " " (one space)???

Dabas
0
 
aeklundCommented:
Try this:
  oExport.CharStringDelimiter = Chr(34)
0
 
mlmccCommented:
oExport.CharStringDelimiter = """"

mlmcc
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
aeklundCommented:
I guess we all have the same idea going here.
0
 
CleanupPingCommented:
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?
0
 
pmartin73Author Commented:
This is a bug in the Crystal Report Designer Component 9. There is a hotfix to resolve this issue:

http://support.crystaldecisions.com/library/kbase/articles/c2012708.asp
0
 
CleanupPingCommented:
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.
0
 
DabasCommented:
If you want to get a refund for this question, post a zero-point question in http://www.experts-exchange.com/Community_Support/

Subject: Moderator Please Refund Points
Body: Please PAQ/Refund this question:
http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_20541645.html
Reason: I answered the question myself
0
 
DanRollinsCommented:
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
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 2
  • 2
  • 2
  • +3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now