Solved

Problems emailing using Crystal ActiveX Control

Posted on 2001-07-01
7
890 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
  • 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
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 

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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
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…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

746 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now