|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Thursday, September 27, 2012 12:37 AM
Points: 1,
Visits: 0
|
|
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
|
|
|
|
|
Right there with Babe
      
Group: General Forum Members
Last Login: Thursday, May 16, 2013 8:03 AM
Points: 770,
Visits: 681
|
|
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
|
|
|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Sunday, May 12, 2013 9:33 AM
Points: 30,
Visits: 112
|
|
Goto Expressions :
iif(fields!country.value="","",<field_name>,<field_name>)
|
|
|
|