Question

How to schedule a report to run on the last day of the month in SSRS?

Asked by: catherinelouise

I would like to schedule an SSRS report to run on the last day of each month, I cannot figure out how to do this on the scheduling page.

Will I be forced to amend my report and schedule it to run on the first day of the month for the previous month?

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2008-11-03 at 02:59:21ID23870265
Tags

Microsoft

,

Reporting Services

,

2005

Topics

SQL Reporting

,

SQL Server 2005

Participating Experts
2
Points
500
Comments
9

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. Schedule Printing in SSRS 2005
    Hi i am using SSRS 2005. I genarated reports.Nnow i want to schedule in such a way that every day it prints that report at a perticular time to Perticular printer. I know how to schedule them and send it to email,s but now i want to schedule them to print . Is this possib...
  2. How to schedule a SSRS 2005 report to refresh automat…
    How do you schedule a SSRS 2005 report to refresh automatically and create a PDF? I like to have reports update automatically and create a PDF
  3. Scheduling Subscriptions with SSRS
    I need to schedule Report subscriptions (email) every half hour for specific work hours of the day (ex: 6am through midnight). In the world of Blackberry's, emails are instantly available AND the execs do not want to receive these subscriptions from midnight through 6am. ...
  4. SSRS code to schedule reports
    I am trying to determine how I could schedule SSRS report to run in a group and then email all reports. SSRS scheduling sends each report individually. I have looked at software SQL-RD but it is too expensive for my client. is there any cheap software that would do this ...
  5. Calculate value of previous month using VB expression in S…
    I am creating a report using SSRS 2008, and I pass two parameter i.e Month and Year to get my report generated. Now my question is: the current months value and Year's values on the report is shown by ="Filter Value: " & MonthName(Parameters!ipv_firstPeriodM...
  6. schedule the job in SSRS 2005.
    Hi Experts, Report requirement to schedule the job to run on last day of each month." So could you please walk me through steps of how to achieve the above requirement. Regards, Sreekanth.

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: EugeneZPosted on 2008-11-11 at 19:29:25ID: 22936584

Create a subscription  then:
you can try to do
like in the link
http://developmentnow.com/g/115_2005_11_0_0_629283/Scheduling-outside-SRS.htm


 

by: catherinelouisePosted on 2008-11-13 at 02:36:58ID: 31512637

Thanks EugeneZ - I haven't tested yet but certainly looks like the way to go.

Regards.

 

by: Gav-BPosted on 2009-03-17 at 06:39:45ID: 23907768

I don't know what it is about that site but I am blocked (unusual) from viewing all of developmentnow.com on my work computer.

Could somebody kindly post the main details of this link http://developmentnow.com/g/115_2005_11_0_0_629283/Scheduling-outside-SRS.htm
to answer the "Last/First Working day of the month" question?

 

by: catherinelouisePosted on 2009-03-17 at 07:01:48ID: 23907983

Here you go:

Hello All!

I have a requirement to set a schedule to run a report on the Tuesday
following the last Saturday of the month. It appears that this is not
possible via the Web UI so I hear I need to schedule it outside SRS. Oh yeah
and to make it more complex, if the Tuesday in in the new month, quarter, or
year then the parameter should select the previous month, quarter, or year
not the default of current month, current quarter, or current year. I think
the last part can easily be handled by getting the parameter values from the
date of the last saturday of the month, which would always give you the
correct month for month end reporting no matter if the next Tues is in the
next month or not.

what I need is the syntax for defining the parameters and rendering the
report. I would also like to specify a network drive where it can be
archived, email a link to an audience, and save a snapshot in history.

Can someone please help me with this??? If not all then parts would be
appreciated!!!

Anthony
      Kmistic
12/19/2005 5:35:03 AM
I am in the same situation. Were you able to resolve this?
--
--------------------------------------------
Yes, I searched first :)


[quoted text, click to view]
"anthonysjo" wrote:

> Hello All!
>
> I have a requirement to set a schedule to run a report on the Tuesday
> following the last Saturday of the month. It appears that this is not
> possible via the Web UI so I hear I need to schedule it outside SRS. Oh yeah
> and to make it more complex, if the Tuesday in in the new month, quarter, or
> year then the parameter should select the previous month, quarter, or year
> not the default of current month, current quarter, or current year. I think
> the last part can easily be handled by getting the parameter values from the
> date of the last saturday of the month, which would always give you the
> correct month for month end reporting no matter if the next Tues is in the
> next month or not.
>
> what I need is the syntax for defining the parameters and rendering the
> report. I would also like to specify a network drive where it can be
> archived, email a link to an audience, and save a snapshot in history.
>
> Can someone please help me with this??? If not all then parts would be
> appreciated!!!
>
> Anthony
      anthonysjo
12/19/2005 8:22:02 AM
Yes. Here is what you do. Create a subscription or a shared schedule but
set it to run only once and make it in the past. This will create a Schedule
ID in the database that you can reference later. Then open the Report Server
Database and return all rows for either the Schedules or Subcriptions table
depending on what you created. Copy the Schdule ID out of the table and make
note of the Event Type.

Now that you have this you can use the following code to fire the report
manually:

exec ReportServer.dbo.AddEvent
@EventType='SharedSchedule', --Enter the event type here from the schedule
table in ReportServer Database
@EventData='29C3FF88-D0D4-4B8A-A5D3-55DCBA8C215D' --Enter the subscription
ID here from the schedule table in ReportServer Database


I put this code inside the following stored procedure that is executed every
tuesday by a SQL job. If the @myoutput date = Getdate then it executes the
code above otherwise it does nothing.

CREATE PROC dbo.MONTH_END_SCHEDULE as
--Declare variables
declare @myoutputdate datetime
declare @mydate datetime
declare @minus int
declare @TuesdayFound char(1)
declare @subject varchar (255)
--set variables
set @TuesdayFound='N'
--seed the date with the last day of the month
set
@mydate=dateadd(dd,-1,convert(datetime,convert(varchar(2),datepart(mm,dateadd(mm,1,getdate())))+'/1/'+
convert(varchar(4),datepart(yy,dateadd(mm,1,getdate())))))

--a variable to backwards through the days of the month
set @minus=0
WHILE @TuesdayFound = 'N'
BEGIN
if datepart(dw,dateadd(dd,(@minus*-1),@mydate))=7 -- Find Last Saturday
BEGIN
set @myoutputdate=dateadd(dd, 3,(dateadd(dd,(@minus*-1),@mydate))) --This
will add 3 days to the last Saturday
set @TuesdayFound = 'Y'
END
set @minus=@minus+1
END

print @myoutputdate

if datepart(dy,(getdate()))=datepart(dy,(@myoutputdate))
BEGIN
exec ReportServer.dbo.AddEvent
@EventType='SharedSchedule', --Enter the event type here from the schedule
table in ReportServer Database
@EventData='29C3FF88-D0D4-4B8A-A5D3-55DCBA8C215D' --Enter the subscription
ID here from the schedule table in ReportServer Database
PRINT datename(mm, @mydate)+ ' ' + datename(yyyy, @mydate)+ ' Reports Fired '
SET @subject = datename(mm, @mydate)+ ' ' + datename(yyyy, @mydate)+ ' Month
End reports are ready for viewing '
Exec master..xp_sendmail
@recipients = 'someone@somewhere.com',
@copy_recipients = 'someone@somewhere.com',
@subject = @subject,
@message = 'Month End reports are now available via reporting services.

You can click on the link below and you will be taken directly to the
Month-End reports folder where you may choose to view the most recient
reports or view the history for archived reports.

http://localhost/Reports

If you have any questions please send an email to
someone@somewhere.com'
END
GO


 

by: Gav-BPosted on 2009-03-17 at 08:40:39ID: 23909244

Thanks Catherine!

Did you get it to work as you wanted?

 

by: catherinelouisePosted on 2009-03-17 at 09:00:29ID: 23909465

Well as I'm a fan of working smarter not harder (aka lazy) - I fiddled my report and have it run at 00:01 on the first day of every month (which is easily set up within Subscriptions) and return data for the previous month.

 

by: Gav-BPosted on 2009-03-17 at 09:54:57ID: 23910026

LOL, good idea :) if it works ok for you.

I'm thinking of doing the same thing for "First Working Day" and plumping for just the 1st of every month.

BUT, unfortunately, I really do need to be able to schedule the morning of the last working day of the month so I'm plugging away.

My perfectionism wont let me give up in any case ;)

- Gav B.

 

by: Gav-BPosted on 2009-03-17 at 10:06:02ID: 23910155

http://www.informit.com/articles/article.aspx?p=470593&seqNum=7

...Gives some good insight into how SSRS schedules work.

- Gav B.

 

by: catherinelouisePosted on 2009-03-17 at 10:10:21ID: 23910198

Nice one - thanks!  Hope you get it worked out.

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...