Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
sprotson
Yak Posting Veteran
75 Posts |
Posted - 2012-02-16 : 08:41:12
|
I have built a very simple matrix report whihc shows whether a call centre agent has a skill enabled or disabled. This is based on the field Skill_on, and for each agent whith the skill can be 0 (disabled) or 1 (enabled).Agents who do not have the skill do not have an entry in the table, but do in the report as they have other skills assigned to them.I need to be able to show in the report: Blank (agent does not have skill), Enabled (agent has skill and it is enabled eg 1) and Disabled (agent has skill but it is disabled eg 0).I have used the following expression, but always receive an error.=IIF(Fields!Skill_On.Value = "", "",IIF(Fields!Skill_On.value = "1","Enabled","Disabled"))I am guessing it is because there are no "" entries, because the agent who does not have the skill (either enabled or disabled) does not have an entry in the database table.Any suggestions how I can get around this? |
|
sunitabeck
Master Smack Fu Yak Hacker
5155 Posts |
Posted - 2012-02-16 : 09:00:31
|
If the value is indeed blank, i.e., empty string, what you have there should work. However, if the value is NULL, you should change it to:=IIF(Fields!Skill_On.Value is nothing, "",IIF(Fields!Skill_On.value = "1","Enabled","Disabled")) |
|
|
sprotson
Yak Posting Veteran
75 Posts |
Posted - 2012-02-16 : 09:06:06
|
The value is NULL. It now worksThanks very much for the help and the quick response |
|
|
sunitabeck
Master Smack Fu Yak Hacker
5155 Posts |
Posted - 2012-02-16 : 09:07:16
|
quite welcome! |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
|
|
|
|