Monday, March 12, 2012

Generating a personalised report for every vendor and mailing out the same

I have the following reporting scenario.
I have a table which contains a list of customers/vendors and each
record in this table as the customer/vendor number, name and email
address of the vendor and also the record as the value of the business
done by the vendor/customer for this month, year to date, last
year,etc our business wants us to generate a report for each
customer/vendor from this table and email the resulting output in a
.pdf report to the email address on this record. It is almost like the
account statement for each customer or vendor for that month.
Please clarify how I can implement this solution with DTS. I can see a
stored procedure can go through all the customers but how do I
generate the statement for each customer into a .pdf output and then
email that file to that vendor/customers email address from SQL+DTS
Thanks
KarenKaren
Start with www.sqldts.com
declare @.sql varchar(255)
set @.sql='bcp "select * FROM northwind.dbo.orders WHERE employeeid = 1"
queryout "c:\temp\1.csv" -c -T -SSERVER -Usa -Ppass'
exec master..xp_cmdshell @.sql
"Karen Middleton" <karenmiddleol@.yahoo.com> wrote in message
news:a5fd468a.0504111747.90b8491@.posting.google.com...
> I have the following reporting scenario.
> I have a table which contains a list of customers/vendors and each
> record in this table as the customer/vendor number, name and email
> address of the vendor and also the record as the value of the business
> done by the vendor/customer for this month, year to date, last
> year,etc our business wants us to generate a report for each
> customer/vendor from this table and email the resulting output in a
> .pdf report to the email address on this record. It is almost like the
> account statement for each customer or vendor for that month.
> Please clarify how I can implement this solution with DTS. I can see a
> stored procedure can go through all the customers but how do I
> generate the statement for each customer into a .pdf output and then
> email that file to that vendor/customers email address from SQL+DTS
> Thanks
> Karen

No comments:

Post a Comment