Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Export Crystal

Status
Not open for further replies.

gmshiv

Programmer
Sep 22, 2001
4
IN
I have a project(VB 6.0), where I need to export the data from crystal reports to a text file by a single click on a button(I mean, now, what's happening is the crystal is asking for lots of other questions, like the type of export/location etc), which the end user will not understand. I need to suppress those messages, and allways the crystal should be exported to a text file in only one location.

Help me please,

Thanks,
Shivakumar G.M.
 
Hi gmshiv,

If you are using the Crystal run time library there are a couple of properties you need to set:

With oRep
.Database.AddADOCommand con, com -> Data source
.AutoSetUnboundFieldSource crBMTName, True -> autobind to recordset fields
.ExportOptions.DestinationType = crEDTDiskFile -> save to file
.ExportOptions.FormatType = crEFTCommaSeparatedValues -> file format (can have comma seperated)
.ExportOptions.DiskFileName = "temp.csv" -> name of export file.
.Export False -> (false = do NOT prompt for info)
End With

Hope this helps...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top