Behavior difference between BIDS and report server with the val function
Hi everybody, We are facing a problem with conversion data and we really don't know where it happens. Indeed, we want to display something like this : SUM(IIF(Cint(Fields!Ordre.Value) <> 12,val(Fields!CatAnnuel.Value) ,0)) and the fact is: The returning value is good when displayed with BIDS in our local developement environment A #ERROR is displayed when accessing to report manager in the same cell Using the Cint function works well in both environment The problem is only with the Fields!CatAnnuel.Value In the report server, we've got a log ReportProcessingException saying that the operation is not allowed Of course, we've tried everything like testing null values... SSRS 2008 with SSQL 2008 R2 version is used. Thank you folks for any input on that! Didier.
December 20th, 2010 5:30am

Try this. val(Fields!CatAnnuel.Value & "") Hope its helpful....Pavan Kokkula Tata Consultancy Services.
Free Windows Admin Tool Kit Click here and download it now
December 20th, 2010 5:37am

Unfortunatly, we still have an #error message in the corresponding cell. Howerver in VS, a value is displayed, the issue still exists on the report manager using the same database! Is it a bug or something else?Didier.
December 20th, 2010 6:20am

Finnaly, I found out the problem! In the Sum function, we must use the same type, which is in my case a double type. Actually, we cannot sum integers with double numbers, that's why those two expressions are good : SUM(IIF(Cint(Fields!Ordre.Value) <> 12,val(Fields!CatAnnuel.Value) ,NOTHING )) SUM(IIF(Cint(Fields!Ordre.Value) <> 12,val(Fields!CatAnnuel.Value) ,CDBL(0) )) Didier.
Free Windows Admin Tool Kit Click here and download it now
December 21st, 2010 8:58am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics