.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Issue with DateTime parameters in subscriptions - SSRS2008R2

Posted By:      Posted Date: October 12, 2010    Points: 0   Category :Sql Server


I have a data driven subscription set up that passes a datetime value from a query to the report for processing.

The database being queried is sql2008r2, but the report file is an RS 2008 file (not r2) (it was originally developed in 2005 and looks to have been upgraded by the server to the 2008 schema) - its schema is defined as http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition.

When the report runs the following error occurs :- ReportParameterTypeMismatchException: The value provided for the report parameter 'CurrTradeDate' is not valid for its type.;

The field in the database is Datetime, as is the report parameter definition.

If I pass the date parameter as an iso formatted date string (eg '2010-01-01') it works fine.

I was wondering if anyone had encountered this issue before - whether I'm missing something, or whether this is related to the fact I'm running a 2008 rdl file on 2008r2.

Also, should the report server attempt to upgrade the report definition on first execution? Was wondering why that hasn't happened.

Thanks in advance!


View Complete Post

More Related Resource Links

Issue with Enable and Disable Parameters in SSRS 2005

Hi Guys, I am currently facing an issue with Enabling and Disabling Parameters in SSRS 2005. Here is my scenario. I am having the following 4 parameters - ParamType (has values 1,2,3), ParamMonth, ParamStartDate, ParamEndDate Now What I want is When I select ParamType = 1 and 2 then ParamMonth should be enabled and ParamStartDate and ParamEndDate should be disabled. When I select ParamType = 3 then ParamStartDate and ParamEndDate should be enabled and ParamMonth should be disabled. I have done google search on this issue and found out that this is not possible at run time. Is there any alternative for this issue? If the above is not possible, I would like to get atleast in this way : When I select ParamType = 1 and 2 then ParamMonth should show the values (from dataset named MonthDataSet and default should be the latest Month) and ParamStartDate and ParamEndDate should show as NULL. When I select ParamType = 3, then I need to enter ParamStartDate and ParamEndDate values manually or pick via datepicker and ParamMOnth should show as NULL. I am not sure whether this is possible or not....but just trying to get in some way. Here is the query used in MonthDataSet : Select Month_Code, Month_Name from MonthTable. Thanks

Issue with multi valued parameters in SSRS using Oracle data source


Hi All,

I have a dataset which is getting data from oracle datasource and my Dataset query expression is

="select To_Char(Time_Stamp,'Month') as Month, Node_Name as Device,Connection,MSNAME,Monitor,Avg as Average,Max as Maximum FROM OracleDataVW where ((monitor='X' and msname in ('Y')) or (MONITOR = 'CPU Utilization' AND MSNAME = 'utilization')) and TO_Char(Time_Stamp,'Mon YYYY') in  ('"+ Join(Parameters!Parameter1.Value,",") +"')"

My parameter is multiValued parameter. The above query is working good if i select one value,however if select more than one value or all it is not giving me the data. I tried to put Ltrim and Rtrim in Join but it is giving me another syntax error.

Please help me with this

SSRS 2008 datetime parameters



I am trying to design a report that has a parameter named Time Period which, essentially, has the following available values: Last 24 hours, Last 7 days, Last Month, etc.  I have two other datetime parameters named Start Date and End Date which are going to specify the date ranges for which the report will select the data.

The Time period parameter is needed so that if the user specifies "Last Month", for example, the Start Date and End Date parameters automatically refresh to show the date ranges for the last month.  More so, the user can still be able to specify a different date range that they can pick from the calendar picker.

I have encountered several issues in trying to make this work:

  1. If I only specify a default value to the start date and end date parameters, it will only refresh for the initial run, but will not refresh every time I change the Time Period parameter selection.
  2. If I specify "Available Values" to the datetime parameters, then the parameter will turn into a dropdown field and the user will not be able to choose any date from the calendar picker.

I found a work around for this issue by creating an intermediate parameter and every time I change the time period option it will refresh the parameter since it has a stored procedure assigned

string to datetime conversion using date parameters in SSRS


Hello, I have a database field that I am pulling that is type string, but the format of each value is mm/dd/yyyy.  I want to convert this to a datetime format (minus the time) so that i can compare this value to a parameter date range (begin date and end date) that are type datetime so that i can use the calendar control in my report.  i've tried in my select statement to use select.....convert(datetime, stringfieldname, 101), but I get an error that says "Conversion failed when converting datetime to character string". 

I am also open to converting the datetime parameters to strings to do the comparison, but not sure the best way to do this either.


Database Tuning Advisor, Stored Procedure with datetime parameters, syntax error


I receive these error(s) in the Tuning Log. I have several stored procedures and they all use a datetime parameter.

E000    exec <some sproc name> ''2009-01-01 00:00:00:000'',''2010-09-30 00:00:00:000'',N'',N'',NULL,NULL,NULL,NULL,NULL,NULL         1    [Microsoft][SQL Native Client][SQL Server]Incorrect syntax near '2009'.

I am using SQL 2005. Any suggestions?

Thanks, Reece

SQL Execution Error, Specified type is not registered on the target, when adding DateTime parameters


I have SQLServer 2008r2 installed on a Windows Server 2008 R2 machine.  I'm trying to build a report using SSRS - and as soon as I try to add some DateTime parameters to the query and execute, I get

SQL Execution Error.

Executed SQL Statement:  blah blah Error

Source: System.Data

Error Message: Specified type is not registered on the target server.System.DateTime, mscorlig, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089.

I tried taking the suggestion from another thread and installing the .NET Framework 2.0 from: http://www.microsoft.com/downloads/en/details.aspx?FamilyID=B44A0000-ACF8-4FA1-AFFB-40E78D788B00, but I received the message that it is already installed.  How do I get past this error?

SQLCE DateTime v/s C# Datetime comparision Issue


SQLCE Version : 3.5.8080.0
.NET C# :  3.5
Application : Outlook Addin

I am reading an entry from outlook, and storing its datetime into SQLCE database.


MyDatasets.ItemsMappingRow newRow = p_dt.NewItemsMappingRow();
newRow.CDate = Object.

DateTime Issue in WCF


Hello all,

I have a strange problem.

Our System is based on IIS hosting WCF services, which runs on Windows 2003 Server.

We have rich client which runs in terminal Server 2008.

since we change the timezone to Jerusalem with Date Light Savings on both sides we encountered a strange behavior.

In the server I set a DateTime object which set to 18/06/2005 00:00 . When I get the object via WCF service in the client - I get 17/0602005 00:00.

What is wrong ????? Am I missing something? I made sure that both servers have the same Time Zone and DST is set to ON.




Linq: how to share parameters between lambda expressions ?

When using Linq to objects, you will quickly feel the need to pass some parameters from a method to another but it's not so easy because each Linq method is not calling the following one. In a Linq sequence, each method is using the result computed by the previous one. So, local contexts are not visible from one method to another.
The compiler is using two technical different ways to let parameters go out of a method.

How to Encrypt Query String Parameters in ASP.NET

Encrypt Query String Parameters in ASP.NET.u can send secure data one page another page u can also use query string to encrypt

How to format datetime & date with century?

Execute the following Microsoft SQL Server T-SQL datetime, date and time formatting scripts in Management Studio Query Editor to demonstrate the usage of the multitude of temporal data formats available and the application of date / datetime functions.


Essential SQL Server Date, Time and DateTime Functions

The essential date and time functions that every SQL Server database should have to ensure that you can easily manipulate dates and times without the need for any formatting considerations at all.

IsapiModule Error 500 Issue


I am about exhausted trying to figure out this error:

HTTP Error 500.0 - Internal Server Error

Description: The page cannot be displayed because an internal server error has occurred.

Error Code: 0x8007007b

Notification: ExecuteRequestHandler

Module: IsapiModule

Requested URL: http://localhost:80/ReportServer

Physical Path: c:\Program Files\Microsoft SQL Server\MSSQL.2\Reporting Services\ReportServer

When I enable Failed Request Tracing Rules and view the log output I am supposing that the actual problem is in the 2nd call where there are 2 backslashes before the actual filename in the specified path:


CALL_ISAPI_EXTENSION DllName="C:\Windows\Microsoft.NET\Framework\v2.0.50727\\aspnet_isapi.dll"


view state vs request parameters


If  the view state is the data entered into the form fields then they are supposed to be available in the request parameters or request body. Then why would we need view state for?


datetime server



I'd like to have the date and time from server.

DateTime.Now Is ok?

Must be something else?


MVC2 issue - Stuck. Trying to create a cms with nested partials


I am currently trying to display multiple items on a single page. I am not sure as to how to tackle this. What I have is a database table that has all the page data in. I have this run as a PagesController and this works fine. However what I would like to do is, if say the Products page is selected via the menu, I want to pull back not only the Products page html but also get all the products, and even be able to pull them through via category. I was trying to use a partial view, but I can't get it to work. The same would be for other pages, having partial views to display the other content, ie if Gallery is selected, the page html for Gallery shows and it then can push to a partial view that pulls all the gallery images from the gallery db table and so on. 

Maybe I am tackling this the wrong way. I have the pages stored in the db to allow for a CMS system I have setup. Maybe I need to use models for all the other items(Products, Gallery, Videos and such) and use the partial for the page html?

Any help would be greatly appreciated as I am confused.

FormView -- Parameters and asp:Table


I've already solved this problem to my satisfaction, I just want to know WHY it works this way.

I have a FormView control bound to an ObjectDataSource.  Let's say our data source is a hypothetical table with three columns:  id, name, age.  Why is it that when I use the <asp:Table> element inside of the FormView, the parameter values are not set, but when I use the standard <table> tag, it works fine?

This seems like a .NET problem to me.  I expect the <asp:Table> element to work in the same way as <table> because they are, for all intents and purposes, the same thing.  Am I missing something?

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend