How can I send a Crystal Report to Email through Active Server Pages (ASP)?
if some one can post a sample code for it, i will really thankful to him.
i am using seagate 8.5 and asp 3.0.
thankyou in advance
regards

Dani AI

Generated

asked about sending a Crystal Report from Classic ASP (older Crystal Reports / Seagate-era). posted a link-only suggestion and rightly pointed out link-only replies are not ideal. Below are practical, copy‑able steps you can apply today plus a working Classic ASP email example.

Recommended approach (summary)

  • Export the .rpt to a file (PDF is best) on the web server, then attach that file and send it with CDOSYS from ASP.
  • If possible, move the export step off the IIS worker process into a small helper (ASP.NET, scheduled task, or service) that uses CrystalDecisions APIs — automating the desktop designer/RDC directly from ASP is fragile and often causes hangs/permission problems on servers.

Classic ASP: send an exported PDF using CDOSYS (replace paths and SMTP settings)

Set msg = Server.CreateObject("CDO.Message")
msg.Subject = "Report"
msg.From = "sender@example.com"
msg.To = "recipient@example.com"
msg.AddAttachment "C:\temp\report.pdf"

Set cfg = msg.Configuration
cfg.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
cfg.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.example.com"
cfg.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
cfg.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
cfg.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "smtpuser"
cfg.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "smtppass"
cfg.Fields.Update

msg.Send
Set msg = Nothing

Notes and troubleshooting

  • Ensure the ASP/IIS user can write the export folder and read the file. Use absolute paths.
  • If you must export from ASP, configure the Crystal runtime/COM to run under a service account (DCOMCNFG) and test stability — server automation is unsupported by many vendors.
  • Test export manually first (no email) to confirm the PDF exists. Check SMTP connectivity and attachment size limits. Delete temp files after sending.

If migration to ASP.NET is an option, use a small web service that loads the .rpt with ReportDocument and calls ExportToDisk, then call that service from Classic ASP to avoid server-side automation issues.

Recommended Answers

All 2 Replies

You can send Crystal reports as email , plz find the link below:

roy.

This post is nearly 2 year old!
While we like to see a solution to the problem, we rather prefer solution to be explained in the post and not to be redirected to members personal website. So please do not post links to your site and rather use copy&paste in the future.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.