Wrox Programmer Forums
|
BOOK: Professional Crystal Reports for VS.NET
This is the forum to discuss the Wrox book Professional Crystal Reports for Visual Studio .NET by David McAmis; ISBN: 9780764544033
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional Crystal Reports for VS.NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 28th, 2004, 04:30 AM
Authorized User
 
Join Date: Nov 2003
Posts: 42
Thanks: 0
Thanked 0 Times in 0 Posts
Default Emailing Crystal Reports using MicrosoftMail

Hi,

I'm facing an issue when I use the MicrosoftMail option for emailing the crystal report. My code is as follows -

MicrosoftMailDestinationOptions mailOpts = new MicrosoftMailDestinationOptions();
ExportOptions exOpts = new ExportOptions();
ExcelFormatOptions xlOpts = new ExcelFormatOptions();

xlOpts.ExcelTabHasColumnHeadings = true;
xlOpts.ExcelUseConstantColumnWidth = false;
xlOpts.ExcelConstantColumnWidth = 300;

report.ExportOptions.ExportFormatType = ExportFormatType.Excel;
report.ExportOptions.ExportDestinationType = ExportDestinationType.MicrosoftMail;
report.ExportOptions.FormatOptions = xlOpts;

mailOpts.MailToList = "[email protected]";
mailOpts.MailSubject = "Report";
mailOpts.MailMessage = "Generated using Crystal Reports";
mailOpts.UserName = "username";
mailOpts.Password = "password";

report.ExportOptions.DestinationOptions = mailOpts;
report.Export();

When I execute this code, I get an error Error 19 returned by function <MAPILogon>. I'm unable to solve this issue! I'm unable to identify what "Error 19.." means.

I'm using VS.NET 1.0.3705, C#, Win2K professional and Microsoft Outlook as the default mail client. In the Control Panel -> Mail, I've created an account in which the details pertaining to the POP, SMTP, Account Name, Password and LAN connection is provided.

Any guidance on this topic, will be of great help to me.

TIA
Praveen






Similar Threads
Thread Thread Starter Forum Replies Last Post
Comparitive Reports in Crystal Reports tarunm Crystal Reports 1 January 21st, 2006 01:08 AM
comparision among crystal reports and Data reports avats Crystal Reports 0 April 13th, 2005 01:01 PM
How to create/design reports with crystal reports BassmaniaQ Crystal Reports 0 December 14th, 2004 04:58 AM
problem in Emailing a crystal report gmk51080 Crystal Reports 0 November 6th, 2004 11:58 AM
Exporting and Emailing Reports fins32 Access 1 May 8th, 2004 07:30 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.