I'm soooo close to getting this working, and I'm shocked, since it is my first day with Crystal Reports.
My example uses Visual FoxPro code, but I'm sure the VBers and Delphis can easily see what I am doing. Everything works when exporting to things like RTF (type 4), even if running "no dialogs", and everything works if I go through the dialogs with HTML (type 24), but when I try to export without the dialogs (Report.Export FALSE), I get the error "Invalid export DLL or export format".
Here is my code:
[tt]oCRApp = createobject("crystal.crpe.application"
oRep = oCRApp.OpenReport("E:\MyTest.RPT"
oRep.ExportOptions.FormatType = 24
oRep.ExportOptions.DestinationType = 1
oRep.ExportOptions.HTMLFileName = "test"
oRep.ExportOptions.DiskFileName = "test"
oRep.Export(.F.) [/tt]
Again, if I set the FormatType=4 (RTF), it'll spit out a nice RTF file without a hitch. What I have noticed, FWIW, is that if after setting the FormatType to 24 and I query the ExportOptions.DestinationDllName property, it is blank. This is not true if I set it to RTF (and yes, I've tried setting the ExportOptions.DestinationDllName to the same as it is for RTF, but no worky).
Any help or things to try would be appreciated.
Robert Bradley
My example uses Visual FoxPro code, but I'm sure the VBers and Delphis can easily see what I am doing. Everything works when exporting to things like RTF (type 4), even if running "no dialogs", and everything works if I go through the dialogs with HTML (type 24), but when I try to export without the dialogs (Report.Export FALSE), I get the error "Invalid export DLL or export format".
Here is my code:
[tt]oCRApp = createobject("crystal.crpe.application"
oRep = oCRApp.OpenReport("E:\MyTest.RPT"
oRep.ExportOptions.FormatType = 24
oRep.ExportOptions.DestinationType = 1
oRep.ExportOptions.HTMLFileName = "test"
oRep.ExportOptions.DiskFileName = "test"
oRep.Export(.F.) [/tt]
Again, if I set the FormatType=4 (RTF), it'll spit out a nice RTF file without a hitch. What I have noticed, FWIW, is that if after setting the FormatType to 24 and I query the ExportOptions.DestinationDllName property, it is blank. This is not true if I set it to RTF (and yes, I've tried setting the ExportOptions.DestinationDllName to the same as it is for RTF, but no worky).
Any help or things to try would be appreciated.
Robert Bradley