|
-
Aug 29th, 2000, 09:49 PM
#1
Thread Starter
Fanatic Member
Dear All...
I would like to ask about the combination of crystal report and email system.
Here goes the problem.
I've a report designed at crystal report 7.0.
And if the user click print the report, my program will automatically make the report to be an attachment, and will automatically send to an email address.
Can I do that in VB 6.0 ??? If I can, HOW ???
Cheers,
Wen Lie
-
Aug 30th, 2000, 03:45 AM
#2
Lively Member
Save it to a file
Wen,
You can, from VB, select the destination of the report.
REPORT.DESTINATION = 2 will send the report to a file instead of to the printer. You will also need to set the REPORT.PRINTFILENAME property and the type of file it is to print to - see the PrintFileType property to do that.
I'm using Crystal 8 but I can't believe they'd bodge around with such fundamental properties.
Anakim
It's a small world but I wouldn't like to paint it.
-
Aug 30th, 2000, 04:40 AM
#3
Thread Starter
Fanatic Member
Thx... but...
Well... anakim...
Thx.. for your suggestion...
But, I already know about it....
I know how to print to file.
But, now, what I need is...
Whenever the user click print button at crystal report,
my VB program will automatically print the report to printer, and at the same time, will create a file, and then my VB program will automatically send the file created to an email address (the spesific email address).
do you know how to do it anakim ???
Thx,
nd Cheers,
Wen Lie
-
Sep 6th, 2000, 06:22 AM
#4
Lively Member
-
Sep 6th, 2000, 06:24 AM
#5
Lively Member
PS
Erm hope you hadn't got bored of waiting for a reply, neglected to check my email for a couple of days.
Ooops!
Anakim
It's a small world but I wouldn't like to paint it.
-
Sep 6th, 2000, 07:03 AM
#6
Hyperactive Member
What the hell is Crystal Report???
I got it with VB and I don't know what the hell it does!
-
Sep 6th, 2000, 09:29 AM
#7
Lively Member
Crystal's just a tool which enables you to produce professional looking reports. It's quite easy to link it to a DB and extract a load of info, while changing the selection parameters at run time.
If you use Access as the DB then probably you are best using Access' reports but if using an industry DB (Oracle/Informix) then it's very useful.
Have a look at Seagate's site if you want more info....
http://www.seagatesoftware.com/products/crystalreports/
Anakim
It's a small world but I wouldn't like to paint it.
-
Sep 7th, 2000, 03:25 AM
#8
Thread Starter
Fanatic Member
Thx...
Thx... anakim...
I will try the code...
nd will contact you, if I've got trouble with the code.
Cheers,
Wen Lie
-
Sep 7th, 2000, 04:15 AM
#9
You can also use the MAPI controls that comes with VB.
With them you can send e-mail with any MAPI enabled e-mail client.
Just add them to a form and use code simular to this:
Code:
MAPISession1.SignOn
MAPIMessages1.SessionID = MAPISession1.SessionID
MAPIMessages1.Compose
MAPIMessages1.RecipAddress = "[email protected]"
MAPIMessages1.RecipDisplayName = "Someone AnyBody"
MAPIMessages1.MsgSubject = "Report"
MAPIMessages1.MsgNoteText = "The report is attached"
MAPIMessages1.AttachmentPathName = "C:\ThePath\TheReportFileName"
MAPIMessages1.Send
MAPISession1.SignOff
Good luck!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|