I finally figured out how to export a report to a file!
where 'EO' is an 'ExportOptions' object and 'report' is a report object which belong to the CPEAUT32.dll (Crystal report automation server) i.e the Crystal Report engine.
Well..
this tip may not be useful to many, but i hope someone looking for code will find it useful at least... like i needed this code.
Code:
Set EO = report.ExportOptions
EO.DestinationType = crEDTDiskFile
EO.FormatType = crEFTText
EO.DiskFileName = "C:\RPTS\TEST.TXT"
report.Export False
where 'EO' is an 'ExportOptions' object and 'report' is a report object which belong to the CPEAUT32.dll (Crystal report automation server) i.e the Crystal Report engine.
Well..
this tip may not be useful to many, but i hope someone looking for code will find it useful at least... like i needed this code.