how to automate reports

ammartahir1978
ammartahir1978 used Ask the Experts™
on
hi Guys,

is there any script available through which i can create a report and then automatically convert it to PDF and email accross to users.

i will be creating reports in SQL server.

Thank you
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Commented:
You mean to say reports like selecting data in Management studio or creating a proper report in sql server reporting service. IF it is latter, you can simply create subscription and choose to send the rendered report on a schedule time to the subscribers. One of the rendered format is pdf too.

Author

Commented:
Thank you TempDB for you response

But what I am saying is like weekly sales report right now I am runnin it manually and then converting them to pDF and sending it out but what I ideally like is every week this report run on a specific time and then get converted to PDF and self emailed to reciept users

Commented:
by report what kind of report you wanted to say. Can you please clarify it?
Whether it is a crystal report, SSRS or just running a query and then creating a pdf with the data only(manually).
Fundamentals of JavaScript

Learn the fundamentals of the popular programming language JavaScript so that you can explore the realm of web development.

Author

Commented:
i have a SQL server i want to create a report for example

select * from sales
where date between ATOMATIC DATE and AUTOMATC DATE
order by store

where automatic date will be the last week date which should automatically passed to this query once thats run then report should get converted to PDF and emailed across

Commented:
If you have reporting service installed, you can do it easily with SSRS by creating .rdl file.
Or else you can use any programming language to get the data from server and then create a pdf for the fetched resutl.
Top Expert 2011

Commented:
You can use a SQLServer job. Check here how to create one : http://msdn.microsoft.com/en-us/library/ms190268.aspx
You can use also use SSIS but this require some learning curve.

There are third party tools that you can use too:
Report genie - basic but free: http://download.cnet.com/Report-Genie/3000-2064_4-10555178.html

R-Tag report manager - advanced and paid : http://r-tag.com/ReportManager.aspx
There is a free version with limitations . I am linked to this company

If it is something temporarily or for personal use I would use SQlServer job.
If you need some advanced  options like to keep history of the reports, share them on the local network, SharePoint, combine them with other reports I would use R-Tag manager or SSIS
R-Tag report manager will allow other users to run the queries too since it provides a viewer.
Top Expert 2011
Commented:
BTW for the ATOMATIC DATE you can use GETDATE() function
For example this will return sales for the last 7 days:
select * from sales
where date between DateAdd(dd,-7, GETDATE()) and GETDATE()
order by store

You may need to round the dates to ignore time. One more step will be to get the sales for a relative period in the past for example 7 days to last Monday.

Author

Commented:
thank you Vasto that is great

Author

Commented:
excellent

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial