all groups > sql server reporting services > september 2005 >
You're in the

sql server reporting services

group:

Expressions as a field value in a table



Expressions as a field value in a table g3kamdbs
9/21/2005 2:55:04 PM
sql server reporting services: Is there a way to store an expression inside a table, and have the expression
being pulled from the table to execute during run time? I want to dynamically
create an expression based on the value of a column of the table. Using the
IIF statement will work but it's going to be a very long nested IIF..... and
that brings to the second question -> is there a limit for the length of an
expression?

Re: Expressions as a field value in a table Robert Bruckner [MSFT]
9/21/2005 4:01:03 PM
There is no limit on the length of an expression (other than limits imposed
by the VB.NET compiler).

In your case, you may want to look at alternatives to the IIF function:
* =Choose(...)
http://msdn.microsoft.com/library/en-us/vblr7/html/vafctchoose.asp
* =Switch(...)
http://msdn.microsoft.com/library/en-us/vblr7/html/vafctswitch.asp

In addition, you may want to consider writing a function in custom code or
as custom assembly that contains your logic. You can then reuse the function
from RDL expressions.

-- Robert
This posting is provided "AS IS" with no warranties, and confers no rights.


[quoted text, click to view]

Re: Expressions as a field value in a table GeoSynch
9/21/2005 8:49:12 PM
Or a User Defined Function that the Stored Procedure calls.


GeoSynch


[quoted text, click to view]

AddThis Social Bookmark Button