Solved

Problems emailing using Crystal ActiveX Control

Posted on 2001-07-01
7
900 Views
Last Modified: 2011-04-14
Hi,

I am having a serious problem since I upgraded to Crystal 7.0. My program now seems to be behaving very weirdly whenever I try to email out a report. I am using Visual Basic 6.0 on Winme using an Access database via ODBC for the development platform

I don't know whether any of you have experienced this before, but my application would be able to email out for the very first time, then after that, when I try to email again, I would always get an error message

"20545     User Has Canceled Operation.     The user has clicked the Cancel button in a dialog box during the session.". Funny thing is I did not touch anything...

I have to shut down the application and start it again, then it will behave exactly in the same manner. Very weird. However, when I check my Outlook Outbox, I can see the email there. Weird!!!

When I was using Crystal 5.0, I did not face this problem.
I tried to export to MAPI from the Crystal Report Designer, and it work without any problem, which shows my MAPI has been configured properly. So what the hell is wrong here??? Is it a bug?

Here is the sample code I am using. Report1 is the name of the Crystal Reports ActiveX component.

  Report1.ReportFileName = "C:\TEST.RPT"
  Report1.Destination = crptMapi
  Report1.PrintFileType = crptCrystal
  Report1.PrintFileName = PathName.Text
  Report1.EMailToList = "TEST@TEST.COM"
  Report1.EMailCCList = ""
  Report1.EMailSubject = "HELLO"
  Report1.EMailMessage = "MESSAGE BODY"
  Report1.Action = 1

It looks correct isn't it? I don't see any problems with it, since the report could print to the printer and screen.

Please help as I have been trying to solve this problem for the past 2 weeks. I have tried opting to use the CRPE API engine, but the manual says I cannot use the CRPE and the ActiveX control in the same application, and the CRPE engine seems to be very much complicated to use then the ActiveX component.

Please give me a solution, anything to solve this mystery.

Thanks a lot.
0
Comment
Question by:dinoang22
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 4

Expert Comment

by:jrmn
ID: 6243791
Hi dinoang22,

Try reading these k-base articles from crystal reports site. Maybe one of these will solve you problem :

http://support.seagatesoftware.com/library/kbase/articles/C2002185.asp
http://support.seagatesoftware.com/library/kbase/articles/C2002181.asp

Goodluck,
jrmn
0
 

Author Comment

by:dinoang22
ID: 6243813
Hi jrmn,

Thanks for the info. The article

http://support.seagatesoftware.com/library/kbase/articles/C2002185.asp

answered the problem I was facing. So indeed it was a problem with Crystal Reports 7 and not my program code. This is really annoying, seagate software should have made their codes backward compatible. The solution given by them would have to code the MAPI profile into your source code. Of course I could have added a MAPI setup first in my program, but it too troublesome since my customer is already using the software in 4 countries.

I tried the code provided but I still am getting the same error message. I'm wondering why?  The suggested code was :-

Dim ol As New Outlook.Application
Dim ns As Outlook.NameSpace
'Return a reference to the MAPI layer
Set ns = ol.GetNamespace("MAPI")
'Logon to Outlook and then create a new session
'The first argument in the Logon method will be the name of your MAPI profile (i.e. Outlook Profile)
ns.Logon "MS MAPI Settings", "", False, True

I am seeking a new way to overcome this using the CRPE API engine. Its exactly the same engine that the Crystal Report Designer program is using.

I believe everyone who is using the Export function to MAPI is facing this problem. Does Seagate have a patch or something?

Anyway, thanks for the help. Any comments would be welcome.
0
 
LVL 4

Expert Comment

by:jrmn
ID: 6243902
Hi dinoang22,

There's another article related to this problem but this is for automation server. Just read this you might get some ideas here:

http://support.seagatesoftware.com/library/kbase/articles/C2005009.asp

Actually, there are various updates for crystal reports 7 but I'm not sure if they'll fix the problem you have above.
There are lot of new stuffs in version 8 and 8.5 but I can't guarantee if these new versions will solve your problem as I haven't done the thing you presented here.
Perhaps other experts can give you a sort of an "overview" later on if your problem can be solve with the latest version.
 
Anyway, if you're intested enough, check the links below as these leads you to update files for crystal reports 7.0 :

http://support.crystaldecisions.com/communityCS/FilesAndUpdates/mr1.htm
http://support.crystaldecisions.com/communityCS/FilesAndUpdates/SR293_7010192.zip.asp
http://support.crystaldecisions.com/communityCS/FilesAndUpdates/expt_vim.zip.asp
http://support.crystaldecisions.com/communityCS/FilesAndUpdates/p2smon701008.exe.asp
http://support.crystaldecisions.com/communityCS/FilesAndUpdates/crdb2bind.zip.asp
http://support.crystaldecisions.com/communityCS/FilesAndUpdates/p2lodbc.zip.asp
http://support.crystaldecisions.com/communityCS/FilesAndUpdates/19898.zip.asp

Goodluck,
jrmn

0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 

Author Comment

by:dinoang22
ID: 6244149
Hi Jrmn,

Thanks for the Info. I'll try the patches and see. Anyway, I got the earlier code working. However, I have to declare the MAPI profile inside the VB code. I was thinking of adding a MAPI setup in my program to allow the user to select the MAPI profile of their choice before emailing using Crystal Reports.

Do you know how to list the MAPI profile of a machine in VB 6?

Thanks a lot
0
 
LVL 4

Expert Comment

by:jrmn
ID: 6244310
Hi dinoang22,

Unfortunately, I don't have any experience programming using VB as I'm using Delphi as a development tool.

I went to the Visual Basic area on EE and search for any topic related to MAPI. Well, I found a lot of it there.
Just take a look for yourself and see which of those topics suits your need.

I'm glad to hear that you have "partially" solve your problem. :-)

I'll make this comment an answer in the assumption that it helped you in a way or 2 and that other users can get something from this one later on in case they'll encounter the same or similar problem.

Just reject it if you feel the solutions I gave you doesn't help you at all...it's fine with me :-)

Cheers,

jrmn
0
 
LVL 4

Accepted Solution

by:
jrmn earned 200 total points
ID: 6244430
Opps, I forgot to mark my previous entry as an answer..sorry  ;-)
0
 

Author Comment

by:dinoang22
ID: 6247266
Hi jrmn,

Your solution provided me an insight on how to solve the problem. The article which you asked me to view at

http://support.seagatesoftware.com/library/kbase/articles/C2002185.asp

seems to have provided me a clue and with some additional research, I was able to get my application and Crystal Reports working with MAPI.

Again, thanks for the help. It has really ease my nerve on this issue and I can move on.

Cheers dude, you deserve the points.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

622 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question