Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 Reporting Services Development
 Emailing and SQL Report

Author  Topic 

paulmac10578
Starting Member

2 Posts

Posted - 2005-11-21 : 23:09:08
Hi all,

A question from a beginner.

Is it possible to auto generate an SQL report to a pdf document and then send it to an email address that is stored in the SQL database?

We have an ASPX form set up so that when a person registers, it sends them an email and me an email, letting both parties know that the registration has taken place. It also submits it to an SQL Database.

From the SQL DB we create an Invoice Report using SQL Reporting Services. I want to know if it is possible to automate the report to be a PDF Document and then send it to the participant using the email address they have specified (this will also be stored in the DB)

Any help will be greatly appreciated.

THANKS
Paul

jhermiz

3564 Posts

Posted - 2005-11-28 : 16:15:19
quote:
Originally posted by paulmac10578

Hi all,

A question from a beginner.

Is it possible to auto generate an SQL report to a pdf document and then send it to an email address that is stored in the SQL database?

We have an ASPX form set up so that when a person registers, it sends them an email and me an email, letting both parties know that the registration has taken place. It also submits it to an SQL Database.

From the SQL DB we create an Invoice Report using SQL Reporting Services. I want to know if it is possible to automate the report to be a PDF Document and then send it to the participant using the email address they have specified (this will also be stored in the DB)

Any help will be greatly appreciated.

THANKS
Paul



No and yes :)

You can have subscriptions send pdf files, but that would mean a static address. Otherwise you can do one of two things, write an application that sends the mail and attaches the pdf, or use xp_sendmail from sql server itself, in this case you need SQL mail setup to send the mail.

Jon



Keeping the web experience alive -- [url]http://www.web-impulse.com[/url]
Imperfection living for perfection --
[url]http://jhermiz.blogspot.com/[/url]
Go to Top of Page

paulmac10578
Starting Member

2 Posts

Posted - 2005-11-30 : 01:36:21
Thanks Jon,

I really appreciate your input/advice.

Kind Regards,
Paul
Go to Top of Page

leojpaul
Starting Member

4 Posts

Posted - 2005-12-07 : 08:23:24
Hi jon

I have a similar case where i have to send the report in the pdf format .

can u explain How to do this?
Go to Top of Page

jhermiz

3564 Posts

Posted - 2005-12-07 : 09:02:13
Hello leojpaul,

Is the report to be sent to a static email address? Meaning do you know who the report needs to go to beforehand?
If so simply create a subscription right inside reporting services and set the output of the report to attach a pdf.

That's all there is to it.

Jon



Keeping the web experience alive -- [url]http://www.web-impulse.com[/url]
Go to Top of Page

leojpaul
Starting Member

4 Posts

Posted - 2005-12-07 : 09:07:33
Thanks for ur reply

sorry if i am wrong....will the output from the sql server be in pdf format..?
Go to Top of Page

jhermiz

3564 Posts

Posted - 2005-12-07 : 10:37:18
what are you referring to? Reporting services allows for export to pdf format, so set the subscription to pdf format thats all.




Keeping the web experience alive -- [url]http://www.web-impulse.com[/url]
Go to Top of Page

andrew253
Starting Member

1 Post

Posted - 2005-12-19 : 15:05:33
I am writing a C# application that generates a report and then emails it to two addresses in pdf form. Can ne one give me some direction?
Go to Top of Page

jhermiz

3564 Posts

Posted - 2005-12-19 : 15:08:14
Direction with what ?

How are you creating the pdf's ? Do you have adobe acrobat printer distiller?
Are you running a 3rd party like fineprint to pdf to get a pdf out of your system?

First you need the pdf...emailing is the easy part, you would use an Email Object create an instance, set the subject and body fields, attach the pdf and .Send it :).




Keeping the web experience alive -- [url]http://www.web-impulse.com[/url]

RS Blog -- [url]http://weblogs.sqlteam.com/jhermiz[/url]
Go to Top of Page
   

- Advertisement -