We are facing an error regarding with Crystal Report for Visual Studio. We have an application which can send invoices to e-mail. When we do export the Crystal Report we are getting following error for some clients.
Crystal Reports Error description:
- Error: crystal report error external component has thrown an exception.
- System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
- Error: Invalid export options Exception Description:
Crystal Report for Visual Studio
Outlook 2010 or 2013
The error may happen also if IE 11 is started and then closed or if Outlook is closed while the export is happening. IE 11 has a WEB interface to MAPI for Mail.
CR for VS .NET has always required Outlook to be running when exporting to MAPI as the destination.
After a quick search on the WEB for sample code on how to detect if Outlook is running here is an example of how to:
bool msOutlook = false;
foreach (Process otlk in Process.GetProcesses())
msOutlook = true;
TextboxForMessages.Text = "Outlook is running";
MessageBox.Show("Outlook needs to be running to send email - starting it now. Then resend your export", "Mail error", MessageBoxButtons.OK, MessageBoxIcon.Error);
Crystal Report for Visual Studio, Outlook, Access Violation, read write protected memory , KBA , BI-RA-CR-SDK , SDK related, including Java/.NET etc. , Problem