473,785 Members | 2,283 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

report via Email

hi,
1- I've a report (Crystal reports) created from a vb Form
(crystalReports Viewer)
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 1420
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 MicrosoftMailDe stinationOption s

Dim crReportDocumen t As New ReportDocument( )

crReportDocumen t.Load(ReportFi leName)
'Get reference to Export options object from the current report
myExportOpts = crReportDocumen t.ExportOptions

myExportOpts.Ex portFormatType = ExportFormatTyp e.PortableDocFo rmat

myExportOpts.Ex portDestination Type = ExportDestinati onType.Microsof tMail

'Set Mail options

myMailOpts.Mail Message = "Assign the Message Value here"

myMailOpts.Mail ToList = yo******@yourSe rver.com

myMailOpts.Mail Subject = "Mail Subject"

'Send reference of Mail Options object to ExportOptions

exportOpts.Dest inationOptions = myMailOpts

'Export the Report

crReportDocumen t.Export()

Good Luck!
"touf" <to******@hotma il.com> wrote in message
news:%2******** ********@tk2msf tngp13.phx.gbl. ..
hi,
1- I've a report (Crystal reports) created from a vb Form
(crystalReports Viewer)
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******@hotma il.com> wrote in message
news:%2******** ********@tk2msf tngp13.phx.gbl. ..
hi,
1- I've a report (Crystal reports) created from a vb Form
(crystalReports Viewer)
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******@hotma il.com> wrote in message
news:#l******** ******@tk2msftn gp13.phx.gbl...
hi,
1- I've a report (Crystal reports) created from a vb Form
(crystalReports Viewer)
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
23877
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 to use a database table but all I want to do now is to click a command button to display this access report. Any suggestions please ?????
24
4208
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 have is this: The "primary" or "source" table is easy. This is a trial balance (account number as a primary key, description, amount). I'll need table(s) to denote which account numbers belong to which
7
8381
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 the options that I have found to email a report email multipul pages of the report, i.e. it sends all the information it can get fomr the query results. I am triggering the report via VBA off of a form. There is a button that
7
2631
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 not Work' It appears that the type of object returned from the "AllReports" collection is not a report object. =>> I need it to be an object of type report.
9
3077
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 to appear in the report is Yes, No, or Maybe. What do I need to do to change what appears in the report/what term do I need to search out in Google? Thank you Colin
9
9424
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? Home brew using print document? (Program to be distributed thoughout this office and possibly to a few other organizations that have expressed an interest). I've taken a couple of stabs at this and either this is more
7
3481
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 page. Is there a way to accomplish this? Thanks so much for your help!
2
1490
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) a vb.net app and is being put into the users hands this week. I am using Crystal Report X to produce reports. The users now, rather than printing, want them emailed and produced in .pdf format also. So rather than me re-inventing the wheel, I'm...
3
3013
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
3541
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 print the report three times, but do not know how
0
10357
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10162
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10101
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9959
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7509
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5396
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5528
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3665
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2893
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.