Export Crystal report to a MailBody (HTML).

G

Geir Holme

Hi all.
I don't know if this is the place for .NET/Crystal problems. Correct me if
there are any other places I should post this kind of questions.

All I want to do is to export a report as html body via CDO mail.

I can get it to work fine if I export to a file first. Then read the file
like

Dim tsReader As StreamReader = New
StreamReader("C:\Crystal\CrystalReport4\Testing.htm")

But isn't there a way I can do this without exporting to file first?

I have some hints on this, but it gives me an error as follow.

Dim stReader As StreamReader
stReader =
crReportDocument.ExportToStream(CrystalDecisions.Shared.ExportFormatType.HTM
L40)

"Could not find file
"C:\DOCUME~1\geir\LOCALS~1\Temp\export_33aa46fe-c9ec-48ce-8551-ddcc67aadb9c.
tmp"."


any ideas out there?

-geir
 
Y

Ying-Shen Yu[MSFT]

Hi Geir,

I tried this code and got the same problem, from the exception stack trace,
it seems the exception is thrown from the ExportToStream method.
In this case, I suspect it is a issue more related to CrystalReport not
.NET Framework. You may contact support at Crystal Report
(www.businessobject.com) to get more information for this issue.

Thanks!

Best regards,

Ying-Shen Yu [MSFT]
Microsoft community Support
Get Secure! - www.microsoft.com/security

This posting is provided "AS IS" with no warranties and confers no rights.
This mail should not be replied directly, please remove the word "online"
before sending mail.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top