Click here to Skip to main content
15,891,316 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
VB
iif((Fields!VTL_Emp.Value="TRUE")AND(Fields!VTL_EMPTimeStamp.Value)>=(Parameters!StartDate.Value)AND(Fields!VTL_EMPTimeStamp.Value)<(Parameters!EndDate.Value),1,0)or
iif((Fields!VTL_Spouse.Value="TRUE")AND(Fields!VTL_SpouseTimeStamp.Value)>=(Parameters!StartDate.Value)AND(Fields!VTL_SpouseTimeStamp.Value)<(Parameters!EndDate.Value),1,0) or
iiF((Fields!ADD_Emp.Value="TRUE")AND(Fields!ADD_EMPTimeStamp.Value)>=(Parameters!StartDate.Value)AND (Fields!ADD_EMPTimeStamp.Value)<(Parameters!EndDate.Value),1,0)or
iiF((Fields!ADD_Family.Value="TRUE")AND (Fields!ADD_FamilyTimeStamp.Value)>=(Parameters!StartDate.Value)AND (Fields!ADD_FamilyTimeStamp.Value)<(Parameters!EndDate.Value),1,0)





it was showing error ...

how can i write this expression in ssrs
Posted

1 solution

You want to use logical ands and ors.
So you must change a couple things
C++
(Fields!VTL_EMPTimeStamp.Value)>=(Parameters!StartDate.Value)
is to be replaced with
C++
(Fields!VTL_EMPTimeStamp.Value >= Parameters!StartDate.Value)
or globally,
C++
iif((Fields!VTL_Emp.Value="TRUE") AND
	(Fields!VTL_EMPTimeStamp.Value>=Parameters!StartDate.Value) AND
	(Fields!VTL_EMPTimeStamp.Value<parameters!enddate.value),1,0)>
or
iif((Fields!VTL_Spouse.Value="TRUE")AND
	(Fields!VTL_SpouseTimeStamp.Value>=Parameters!StartDate.Value)AND
	(Fields!VTL_SpouseTimeStamp.Value<parameters!enddate.value),1,0)>
or
iiF((Fields!ADD_Emp.Value="TRUE")AND
	(Fields!ADD_EMPTimeStamp.Value>=Parameters!StartDate.Value)AND
	(Fields!ADD_EMPTimeStamp.Value<parameters!enddate.value),1,0)>
or
iiF((Fields!ADD_Family.Value="TRUE")AND
	(Fields!ADD_FamilyTimeStamp.Value>=Parameters!StartDate.Value)AND
	(Fields!ADD_FamilyTimeStamp.Value<parameters!enddate.value),1,0)>

Lines are here to make the expression clearer.

More simplifications can be done.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900