how to automate reports

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
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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.
ammartahir1978Author 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
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).
SolarWinds® Network Configuration Manager (NCM)

SolarWinds® Network Configuration Manager brings structure and peace of mind to configuration management. Bulk config deployment, automatic backups, change detection, vulnerability assessments, and config change templates reduce the time needed for repetitive tasks.

ammartahir1978Author 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
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.
You can use a SQLServer job. Check here how to create one :
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:

R-Tag report manager - advanced and paid :
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.
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.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ammartahir1978Author Commented:
thank you Vasto that is great
ammartahir1978Author Commented:
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Disaster Recovery

From novice to tech pro — start learning today.