September 27, 2012 at 12:46 am
Hi,
I have a report where countrycode is a paramater and i need to show the date format as dd/MM/yyyy on basis of countrycode. Can someone help me know how can i simplify the statetment for the condition?
In Pseudo code:
If countrycode in ("AU", "NZ", "IN", "MAL")
then
endDate.Format("dd/MM/yyyy")
else
endDate.Format("MM/dd/yyyy")
end if
I need to write somewhat the same for my report (.rdl) file.
Thanks
Susheel
September 28, 2012 at 5:58 am
sanju2t (9/27/2012)
Hi,I have a report where countrycode is a paramater and i need to show the date format as dd/MM/yyyy on basis of countrycode. Can someone help me know how can i simplify the statetment for the condition?
In Pseudo code:
If countrycode in ("AU", "NZ", "IN", "MAL")
then
endDate.Format("dd/MM/yyyy")
else
endDate.Format("MM/dd/yyyy")
end if
I need to write somewhat the same for my report (.rdl) file.
Thanks
Susheel
a case statement is your friend
case when countrycode in ("AU", "NZ", "IN", "MAL") then convert(varchar(12),[datecolumn],101)
else convert(varchar(12),[datecolumn],103)
end
*code may take some tweaking
September 28, 2012 at 6:07 am
Goto Expressions :
iif(fields!country.value="","",<field_name>,<field_name>)
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply