Sunday, March 25, 2012
(nothing = 0) = true !
I want to hide an image when the value is different from 0.
The expression used in the visibility.Hidden property is
"=First(Fields!myfield.Value, "DataSet1") <>0"
And when the database value is NULL this expression returns false.
Please help !
(a French user...)I really canâ't understand why something like that does not work. I always
have to use something like the following:
=iif(Expression, 1=1, 1=0)
I hope it helps you!
> I have a bit type field that can have values 0, 1 and NULL in SQL database.
> I want to hide an image when the value is different from 0.
> The expression used in the visibility.Hidden property is
> "=First(Fields!myfield.Value, "DataSet1") <>0"
> And when the database value is NULL this expression returns false.
> Please help !
> (a French user...)
>|||thanks for you answer but it doen't help me...
I made this test : expression "= nothing = 0" in a new field, it's return
true !
"Soan" wrote:
> I really canâ't understand why something like that does not work. I always
> have to use something like the following:
> =iif(Expression, 1=1, 1=0)
> I hope it helps you!
>
> > I have a bit type field that can have values 0, 1 and NULL in SQL database.
> > I want to hide an image when the value is different from 0.
> > The expression used in the visibility.Hidden property is
> > "=First(Fields!myfield.Value, "DataSet1") <>0"
> > And when the database value is NULL this expression returns false.
> >
> > Please help !
> >
> > (a French user...)
> >|||I haven't tried it myself, but you may want to try the following:
"=(First(Fields!myfield.Value, "DataSet1") <> 0) OR
(First(Fields!myfield.Value, "DataSet1") IS DBNull.Value)"
Hope this helps.
Andy
tonio932 wrote:
> I have a bit type field that can have values 0, 1 and NULL in SQL database.
> I want to hide an image when the value is different from 0.
> The expression used in the visibility.Hidden property is
> "=First(Fields!myfield.Value, "DataSet1") <>0"
> And when the database value is NULL this expression returns false.
> Please help !
> (a French user...)
>|||When comparing with NULLs you have to use "is Nothing".
E.g. =iif(Fields!myField.Value is Nothing, True-Part, False-Part)
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"tonio932" <tonio932@.discussions.microsoft.com> wrote in message
news:C4E4FDE8-81C8-41E4-AE37-09671864812A@.microsoft.com...
>I have a bit type field that can have values 0, 1 and NULL in SQL database.
> I want to hide an image when the value is different from 0.
> The expression used in the visibility.Hidden property is
> "=First(Fields!myfield.Value, "DataSet1") <>0"
> And when the database value is NULL this expression returns false.
> Please help !
> (a French user...)
>|||I have noticed that when a column value from the database is null, doing
myfield.Value is the same as doing null.Value, which makes RS blow.
Andy Hardin wrote:
> I haven't tried it myself, but you may want to try the following:
> "=(First(Fields!myfield.Value, "DataSet1") <> 0) OR
> (First(Fields!myfield.Value, "DataSet1") IS DBNull.Value)"
> Hope this helps.
> Andy
>
> tonio932 wrote:
>> I have a bit type field that can have values 0, 1 and NULL in SQL
>> database.
>> I want to hide an image when the value is different from 0.
>> The expression used in the visibility.Hidden property is
>> "=First(Fields!myfield.Value, "DataSet1") <>0"
>> And when the database value is NULL this expression returns false.
>> Please help !
>> (a French user...)sql
Thursday, March 8, 2012
"Key cannot be null. Parameter name: key"
We are using forms authentication with SSRS2005 and we are able to access Report Manager (http://servername/reports) and Reportserver (http://servername/reportserver). The problem we are having is every time we add a user to the Content Manager or the Publisher role. The user is able to login and reach the Report Manager but no folder is showing up and also we have the following error message : "Key cannot be null. Parameter name: key".
We removed users from the Content Manager and Publisher Roles and they are able to reach report manager and see the folders. This only happens with report manager. everything works fine with reportserver(http://servername/reportserver).
Any idea why we're getting an error message when trying to assign the Content Manager and publisher Roles to a user.
here is the error log from ReportServerWebApp :
aspnet_wp!ui!1!3/27/2007-16:38:49:: e ERROR: Key cannot be null.
Parameter name: key
aspnet_wp!ui!1!3/27/2007-16:38:49:: e ERROR: HTTP status code --> 500
-Details--
System.ArgumentNullException: Key cannot be null.
Parameter name: key
at System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add)
at System.Collections.Hashtable.Add(Object key, Object value)
at Microsoft.ReportingServices.UI.BasePermissions.ReadPermissions(String[] permissions)
at Microsoft.ReportingServices.UI.Permissions.GetPermissions()
at Microsoft.ReportingServices.UI.Permissions.CurrentUser(String itemPath)
at Microsoft.ReportingServices.UI.FolderPage.Page_Init(Object sender, EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Web.UI.Control.OnInit(EventArgs e)
at System.Web.UI.Page.OnInit(EventArgs e)
at System.Web.UI.Control.InitRecursive(Control namingContainer)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
aspnet_wp!ui!1!3/27/2007-16:38:49:: e ERROR: Exception in ShowErrorPage: System.Threading.ThreadAbortException: Thread was being aborted.
at System.Threading.Thread.AbortInternal()
at System.Threading.Thread.Abort(Object stateInfo)
at System.Web.HttpResponse.End()
at System.Web.HttpServerUtility.Transfer(String path, Boolean preserveForm)
at Microsoft.ReportingServices.UI.ReportingPage.ShowErrorPage(String errMsg) at at System.Threading.Thread.AbortInternal()
at System.Threading.Thread.Abort(Object stateInfo)
at System.Web.HttpResponse.End()
at System.Web.HttpServerUtility.Transfer(String path, Boolean preserveForm)
at Microsoft.ReportingServices.UI.ReportingPage.ShowErrorPage(String errMsg)
Thanks!
chi
Hi
Check the following post out, it may help
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=327150&SiteID=1
|||i checked the link, hmmm... did not work. any other suggestions.
chi
"Key cannot be null. Parameter name: key"
We are using forms authentication with SSRS2005 and we are able to access Report Manager (http://servername/reports) and Reportserver (http://servername/reportserver). The problem we are having is every time we add a user to the Content Manager or the Publisher role. The user is able to login and reach the Report Manager but no folder is showing up and also we have the following error message : "Key cannot be null. Parameter name: key".
We removed users from the Content Manager and Publisher Roles and they are able to reach report manager and see the folders. This only happens with report manager. everything works fine with reportserver(http://servername/reportserver).
Any idea why we're getting an error message when trying to assign the Content Manager and publisher Roles to a user.
here is the error log from ReportServerWebApp :
aspnet_wp!ui!1!3/27/2007-16:38:49:: e ERROR: Key cannot be null.
Parameter name: key
aspnet_wp!ui!1!3/27/2007-16:38:49:: e ERROR: HTTP status code --> 500
-Details--
System.ArgumentNullException: Key cannot be null.
Parameter name: key
at System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add)
at System.Collections.Hashtable.Add(Object key, Object value)
at Microsoft.ReportingServices.UI.BasePermissions.ReadPermissions(String[] permissions)
at Microsoft.ReportingServices.UI.Permissions.GetPermissions()
at Microsoft.ReportingServices.UI.Permissions.CurrentUser(String itemPath)
at Microsoft.ReportingServices.UI.FolderPage.Page_Init(Object sender, EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Web.UI.Control.OnInit(EventArgs e)
at System.Web.UI.Page.OnInit(EventArgs e)
at System.Web.UI.Control.InitRecursive(Control namingContainer)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
aspnet_wp!ui!1!3/27/2007-16:38:49:: e ERROR: Exception in ShowErrorPage: System.Threading.ThreadAbortException: Thread was being aborted.
at System.Threading.Thread.AbortInternal()
at System.Threading.Thread.Abort(Object stateInfo)
at System.Web.HttpResponse.End()
at System.Web.HttpServerUtility.Transfer(String path, Boolean preserveForm)
at Microsoft.ReportingServices.UI.ReportingPage.ShowErrorPage(String errMsg) at at System.Threading.Thread.AbortInternal()
at System.Threading.Thread.Abort(Object stateInfo)
at System.Web.HttpResponse.End()
at System.Web.HttpServerUtility.Transfer(String path, Boolean preserveForm)
at Microsoft.ReportingServices.UI.ReportingPage.ShowErrorPage(String errMsg)
Thanks!
chi
Hi
Check the following post out, it may help
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=327150&SiteID=1
|||i checked the link, hmmm... did not work. any other suggestions.
chi
Saturday, February 25, 2012
"Cannot apply value null to property Login: Value cannot be null..".
According to the Debug Output the process truncates the destination tables but then stops with the: "Cannot apply value null to property Login: Value cannot be null..".
Any help anybody?
NFThis probably means that you need to specify a login to use in the transfer.
Could you repost this in the SSIS forum? (http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=80&SiteID=1)|||
I had the same problem and I was specifying the sa login for my connection. When I tested the connection everything worked fine. But I received the same error message when I attempted to execute the package. I changed it to Windows Authentication and it worked fine. Unfortunately, I have to be able to specify a SQL login when I roll this into production.
I have tried all of the PackageProtectionLevels, but none seem to work. Any help would be greatly appreciated.
|||I had the same problem. I installed SQL 2005 SP1 and it worked for me with SQL authentication.
|||Unfortunately I’m using SSIS between a SQL 2000 (local) & SQL 2005 (remote). If I install SQL 2005 SP1 on my machine will that cure this problem – meaning, will the SSIS tools work properly?
-Cheers
|||Try changing your compatability level of the database to 2005"Cannot apply value null to property Login: Value cannot be null..".
According to the Debug Output the process truncates the destination tables but then stops with the: "Cannot apply value null to property Login: Value cannot be null..".
Any help anybody?
NFThis probably means that you need to specify a login to use in the transfer.
Could you repost this in the SSIS forum? (http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=80&SiteID=1)|||
I had the same problem and I was specifying the sa login for my connection. When I tested the connection everything worked fine. But I received the same error message when I attempted to execute the package. I changed it to Windows Authentication and it worked fine. Unfortunately, I have to be able to specify a SQL login when I roll this into production.
I have tried all of the PackageProtectionLevels, but none seem to work. Any help would be greatly appreciated.
|||I had the same problem. I installed SQL 2005 SP1 and it worked for me with SQL authentication.
|||Unfortunately I’m using SSIS between a SQL 2000 (local) & SQL 2005 (remote). If I install SQL 2005 SP1 on my machine will that cure this problem – meaning, will the SSIS tools work properly?
-Cheers
|||Try changing your compatability level of the database to 2005Friday, February 24, 2012
"Cannot apply value null to property Login: Value cannot be null..".
According to the Debug Output the process truncates the destination tables but then stops with the: "Cannot apply value null to property Login: Value cannot be null..".
Any help anybody?
NFThis probably means that you need to specify a login to use in the transfer.
Could you repost this in the SSIS forum? (http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=80&SiteID=1)|||
I had the same problem and I was specifying the sa login for my connection. When I tested the connection everything worked fine. But I received the same error message when I attempted to execute the package. I changed it to Windows Authentication and it worked fine. Unfortunately, I have to be able to specify a SQL login when I roll this into production.
I have tried all of the PackageProtectionLevels, but none seem to work. Any help would be greatly appreciated.
|||I had the same problem. I installed SQL 2005 SP1 and it worked for me with SQL authentication.
|||Unfortunately I’m using SSIS between a SQL 2000 (local) & SQL 2005 (remote). If I install SQL 2005 SP1 on my machine will that cure this problem – meaning, will the SSIS tools work properly?
-Cheers
|||Try changing your compatability level of the database to 2005"Cannot apply value null to property Login: Value cannot be null..".
According to the Debug Output the process truncates the destination tables but then stops with the: "Cannot apply value null to property Login: Value cannot be null..".
Any help anybody?
NF
This probably means that you need to specify a login to use in the transfer.
Could you repost this in the SSIS forum? (http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=80&SiteID=1)|||
I had the same problem and I was specifying the sa login for my connection. When I tested the connection everything worked fine. But I received the same error message when I attempted to execute the package. I changed it to Windows Authentication and it worked fine. Unfortunately, I have to be able to specify a SQL login when I roll this into production.
I have tried all of the PackageProtectionLevels, but none seem to work. Any help would be greatly appreciated.
|||I had the same problem. I installed SQL 2005 SP1 and it worked for me with SQL authentication.
|||Unfortunately I’m using SSIS between a SQL 2000 (local) & SQL 2005 (remote). If I install SQL 2005 SP1 on my machine will that cure this problem – meaning, will the SSIS tools work properly?
-Cheers
|||Try changing your compatability level of the database to 2005Thursday, February 16, 2012
<> NULL / is not null problem
I have a sp which uses <>NULL syntax to check for not NULL columns but to insert them in a table, but I've noticed that in some cases (some bds and/or servers) it runs ok while in others it fails resulting in a table with no cols inserted (all setted to NULL). I've changed the sp to 'is not null' syntax and now it works properly. What is the reason for this behaviour?Depends. Normally(ANSI SQL):
a<>null = null
whatever a may be. So that does never evaluate to true!
One can change that behavior with SET ANI_NULLS OFF, than you get
a<>null = true
if a is not null and
a<>null = false
if a is null.
HTH,
chris
Monday, February 13, 2012
% Wildcard Include Nulls
I have a query with 4 parameters:
Name
Location
Employee Number
Officer Code
There are no null values in Name, location and Employee Number. However, all employees do not have an officer code. So in my query I use a where clause that says WHERE OfficerCode LIKE'%'+@.Param4+'%'. I use a % for the default value in my ASP.net data control. The only problem is that the only records returned have non-null values in the OfficerCode field. How can I use a wildcard for a default value and return all records (null and non-null)?
OR OfficerCode IS NULL