Anand:
I'm not sure if you're still working on this issue or not, but I just found something today that might be the answer you're looking for. In my last post, I indicated that I got the HTML export to work without an error being generated, but that I didn't get an output HTML file following the export. Well, I found out why...
In the section of the previous post where I'm setting "HTML Format Options", one thing that needs to be set there is "HTMLBaseFolderName" for the HTMLFormatOptions object.
In other words, not only do you have to set the ".HTMLFileName", ".HTMLEnableSeparatedPages", and ".HTMLHasPageNavigator", but you also have to set ".HTMLBaseFolderName", which is basically where the exported HTML file will reside. You have to specify this property, because not only does the exported file exist in that folder, but also any images which are contained in the exported file.
So, if you were exporting your file to HTML, your code would look something like this (based on the previous post):
=============================================
Private Sub Button3_Click(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles Button3_Click
Dim rpt As New CrystalReport1()
Dim dopt As
New CrystalDecisions.Shared.DiskFileDestinationOptions()
Dim htmlOpts As New HTMLFormatOptions()
' Set the HTML format options.
With htmlOpts
.HTMLFileName = "studrpt1.html" <exclude the file path>
.HTMLBaseFolderName = "C:\"
.HTMLEnableSeparatedPages = <true or false>
.HTMLHasPageNavigator = <true or false>
End With
rpt.ExportOptions.FormatOptions = htmlOpts
rpt.ExportOptions.ExportDestinationType =
CrystalDecisions.[Shared].ExportDestinationType.DiskFile
rpt.ExportOptions.ExportFormatType =
CrystalDecisions.[Shared].ExportFormatType.HTML40
dopt.DiskFileName = "c:\studrpt1.html"
rpt.exportOptions.DestinationOptions = dopt
rpt.Export()
End Sub
=============================================
The above code will then export the file (studrpt1.html) to the path: "c:\studrpt\" and within that folder will be the studrpt1.html file, as well as a folder "Images" which will contain any images embedded in the pre-exported report document. Whew!
If you have any questions about this, Crystal Decisions provides a pretty good example of how the code looks and works. Just follow the link:
http://support.crystaldecisions.com/updates/default.asp, and within the filename textbox, enter "vbnet_web_export.exe". Hope all of my rambling helps!