Solved

Default Date Parameter "Error During Processing"

Posted on 2010-09-09
10
347 Views
Last Modified: 2012-05-10
I'm having a problem with a DateAdd function in SQL Server Reporting Services as default value for a parameter.  I've entered the expression "=DateAdd("dd",-60,Today())" as the default value and it doesn't show any errors in the expression builder.  But, when I go to preview the report I get the error "An error occurred during local report processing.  Error during processing of 'ActivityFrom' report parameter."

Any thoughts?
0
Comment
Question by:itsupport1199
  • 5
  • 2
  • 2
  • +1
10 Comments
 
LVL 3

Expert Comment

by:ghayasurrehman
ID: 33640990
use getDate() instead of Today()
0
 

Author Comment

by:itsupport1199
ID: 33641022
It doesn't recognize getDate.   I get the squiggly lines underneath it.  
0
 
LVL 22

Expert Comment

by:8080_Diver
ID: 33641116
Be sure to include the open and close parentheses.  GETDATE()
0
 

Author Comment

by:itsupport1199
ID: 33641181
I did.  Still no luck.  
0
 

Author Comment

by:itsupport1199
ID: 33641233
This is exactly how it appears in the default value box: =DateAdd("dd",-60, getDate())
0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
LVL 22

Expert Comment

by:8080_Diver
ID: 33641514
Drop the = and see if that doesn't help. ;-)
0
 

Author Comment

by:itsupport1199
ID: 33641564
No luck there, either.  When I drop "=" the whole expression gets squigglied in the expression builder and I get the error "The definition of the report '/Member Activities by Chapter' is invalid.  The property 'DefaultValue' or report parameter 'ActivityFrom' doesn't have the expected type."
0
 
LVL 10

Accepted Solution

by:
itcouple earned 125 total points
ID: 33641989
=DateAdd("d",-60, Today())
0
 
LVL 10

Assisted Solution

by:itcouple
itcouple earned 125 total points
ID: 33642011
GetDate works fine but in SQL Server ;) in SSRS you are right using Today()

The parameter you want to use is d, dd doesn't exist.

Regards
Emil
0
 

Author Comment

by:itsupport1199
ID: 33642075
Changing "dd" to "d" worked like a charm.  
0

Featured Post

[Webinar] Disaster Recovery and Cloud Management

Learn from Unigma and CloudBerry industry veterans which providers are best for certain use cases and how to lower cloud costs, how to grow your Managed Services practice in IaaS clouds, and how to utilize public cloud for Disaster Recovery

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now