473,387 Members | 3,821 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

report via Email

hi,
1- I've a report (Crystal reports) created from a vb Form
(crystalReportsViewer)
How can I send it via email , In crystal report there is the possibility to
export, but I didn't find a way to send it by email.

2- I've also post a quetion for few days but didn't receive answer: How can
I display a text (invoice number) at th top of all pages of my report, I've
a report header and page header (that contain other informations) , the
problem is that in th first page the report header is on top and the page
header under it.

Thanks for your help.
Nov 20 '05 #1
3 1405
The following code loads the report, export it to PDF format, and send it
through mail.

try this............

Dim myExportOpts as ExportOptions
Dim myMailOpts as new MicrosoftMailDestinationOptions

Dim crReportDocument As New ReportDocument()

crReportDocument.Load(ReportFileName)
'Get reference to Export options object from the current report
myExportOpts = crReportDocument.ExportOptions

myExportOpts.ExportFormatType = ExportFormatType.PortableDocFormat

myExportOpts.ExportDestinationType = ExportDestinationType.MicrosoftMail

'Set Mail options

myMailOpts.MailMessage = "Assign the Message Value here"

myMailOpts.MailToList = yo******@yourServer.com

myMailOpts.MailSubject = "Mail Subject"

'Send reference of Mail Options object to ExportOptions

exportOpts.DestinationOptions = myMailOpts

'Export the Report

crReportDocument.Export()

Good Luck!
"touf" <to******@hotmail.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
hi,
1- I've a report (Crystal reports) created from a vb Form
(crystalReportsViewer)
How can I send it via email , In crystal report there is the possibility to export, but I didn't find a way to send it by email.

2- I've also post a quetion for few days but didn't receive answer: How can I display a text (invoice number) at th top of all pages of my report, I've a report header and page header (that contain other informations) , the
problem is that in th first page the report header is on top and the page
header under it.

Thanks for your help.

Nov 20 '05 #2
Hi Touf,

Re your second question: don't use the report header, or if you must, change
the section expert section to have a 'page after' report header - thus, the
report header will only appear as an opening intro to the report - have the
invoice # be part of the page header: it will be on every page.

HTH,
Bernie Yaeger

"touf" <to******@hotmail.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
hi,
1- I've a report (Crystal reports) created from a vb Form
(crystalReportsViewer)
How can I send it via email , In crystal report there is the possibility to export, but I didn't find a way to send it by email.

2- I've also post a quetion for few days but didn't receive answer: How can I display a text (invoice number) at th top of all pages of my report, I've a report header and page header (that contain other informations) , the
problem is that in th first page the report header is on top and the page
header under it.

Thanks for your help.

Nov 20 '05 #3
Hi, thanks for your help
1- I need to send email from Crystal itself, so the user when he see the
report an check it he can email it (like export)

2- I've found a way to do this: I've created a section containing the
invoice # in the report header and the same in the page header, then I've
suppressed the page header one for the first page.

I works.

"touf" <to******@hotmail.com> wrote in message
news:#l**************@tk2msftngp13.phx.gbl...
hi,
1- I've a report (Crystal reports) created from a vb Form
(crystalReportsViewer)
How can I send it via email , In crystal report there is the possibility to export, but I didn't find a way to send it by email.

2- I've also post a quetion for few days but didn't receive answer: How can I display a text (invoice number) at th top of all pages of my report, I've a report header and page header (that contain other informations) , the
problem is that in th first page the report header is on top and the page
header under it.

Thanks for your help.

Nov 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Nicola | last post by:
Hi Everyone, I am new to programming and would like to know how to open an access Report from within vb 6. I am trying to write a program to organise cross stitch threads. I have found out how...
24
by: Michael Malinsky | last post by:
I'm attempting to create a database which will take information from one (perhaps two) tables and utilize that information to return queries to a report designed in Excel. The general idea I...
7
by: Nothing | last post by:
I have a report based on a query that is based agaisnt two tables. The report pulls information for 1 customer. The tables may hold multipul customers. I want to email just the ONE report. All...
7
by: xzzy | last post by:
I need to automate a report in a different database (and thank yous to Terry Kreft for pointing me in the right direction). below is the code with the one line that does not work, marked: 'Does...
9
by: Colin McGuire | last post by:
Hi, I have an report in Microsoft Access and it displays everything in the table. One column called "DECISION" in the table has either 1,2, or 3 in it. On my report it displays 1, 2, or 3. I want...
9
by: itmags | last post by:
I need to create a couple of reports, invoices, credit reports, etc... My question is: How/what is the best way to go about this using VB2005 / SQL Server 2000 Crystal Reports? MS Reporting?...
7
by: itm | last post by:
I have a mail out to send to a group of owners with multiple accounts. I want to limit the number of accounts that print on the first page to 20. I want remaining accounts to print on a second...
2
by: Hexman | last post by:
Hello All, I'm nearing the end of my current project and the users came up with 2 more requests. I'll talk about the first one in this message. I've developed (with much help from this group)...
3
by: jambonjamasb | last post by:
Hi I have two tables: email_tbl Data_table Data table is is used to create a Form Data_form
12
by: Studiotyphoon | last post by:
Hi, I have report which I need to print 3 times, but would like to have the following headings Customer Copy - Print 1 Accounts Copy - Print 2 File Copy -Print 3 I created a macro to...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.