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 |
cipriani1984
Constraint Violating Yak Guru
304 Posts |
Posted - 2009-10-09 : 06:23:02
|
HiIm creating a grid with the following query:Select Product, Content, 'Date of release' AS Label, convert(varchar, datevalue) AS UnitFrom tableaUNION ALLSelect Product, Content, 'Unit of download' AS Label, convert(varchar, Unit) AS Unitfrom tableaIn the grid i need to format the numbers as they come out as raw numbers so I have a IIF running in the gridiif((Fields!Label.Value = "Date of release"), Fields!Unit.Value, formatnumber(Fields!.Unit.Value))It formats the numbers perfectly to what I want, but the date value just displays '#Error'But if I remove the IIF and just display Fields!Unit.Value it shows all the data fine but not formatted.Any help please, its quite urgentMany Thanks |
|
JCirocco
Constraint Violating Yak Guru
392 Posts |
Posted - 2009-10-09 : 08:40:36
|
How about, on your Format option for that field, build the expression the same was as the one that determines what to display?I am assuming that if Value="Date of release" you want something like dd/MM/yyyy. What is the format supposed to be if false?John |
|
|
cipriani1984
Constraint Violating Yak Guru
304 Posts |
Posted - 2009-10-09 : 08:52:27
|
the IIF statement im using it for if the value is that then show the date from that value, if false then formatnumber the value.But ive sorted it now anywaysquote: Originally posted by JCirocco How about, on your Format option for that field, build the expression the same was as the one that determines what to display?I am assuming that if Value="Date of release" you want something like dd/MM/yyyy. What is the format supposed to be if false?John
|
|
|
|
|
|
|
|