?
Solved

Specifiying the name of a Crystal Report being exported out of a VB project to Email.

Posted on 2004-10-01
5
Medium Priority
?
325 Views
Last Modified: 2012-08-13
I have a VB app Using Crystal 8.5 Developer to run and then export a report to mail addresses. Currently the name of the exported file is a number. How do I specifiy what I want the exported reports file name to be? And is it possible to name it the current date?

                        crptWeeklyBriefing.ExportOptions.DestinationType = crEDTEMailMAPI
                        crptWeeklyBriefing.ExportOptions.MailToList = "MyName@Yahoo.com"
                        crptWeeklyBriefing.ExportOptions.MailSubject = "Daily Briefing Report"
                        crptWeeklyBriefing.ExportOptions.MailMessage = _
                           "Attached please find the Daily Briefing Report. "
                        crptWeeklyBriefing.ExportOptions.FormatType = crEFTPortableDocFormat
                        crptWeeklyBriefing.Export (False)
0
Comment
Question by:DavidNPD
[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
  • 2
  • 2
5 Comments
 
LVL 13

Expert Comment

by:vidru
ID: 12202297
crptWeeklyBriefing.ExportOptions.DiskFileName = "YourFileName.pdf"

To save it with the date as the file name, make sure that the date is in a valid format for a file name:

crptWeeklyBriefing.ExportOptions.DiskFileName = Format(Date, "MM-DD-YYYY") & ".pdf"

-dave
0
 

Author Comment

by:DavidNPD
ID: 12202472
I put this code in but it doesnt seem to make any difference, no errors but the file comes in the email named "241.pdf" and then the second time i tried 291.pdf.

0
 
LVL 101

Accepted Solution

by:
mlmcc earned 200 total points
ID: 12202556
I believe you will have to actually export it to a disk file then send it through mail.  Crystal doesn't use the diskfilename unless it creates a permanent file.

mlmcc
0
 
LVL 13

Expert Comment

by:vidru
ID: 12202796
Whoops, shoud've tested that first...

As mlmcc stated, that will only work if actually exporting to disk, then attaching the file.

-dave
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 12205870
Glad i could help

mlmcc
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
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 …
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

770 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