Groups | Blog | Home
all groups > sql server reporting services > may 2005 >

sql server reporting services : Use a Data source in Code


Bryan Avery
5/27/2005 7:00:34 AM
Is it possible to use the Data Source in the Code section?

If so how?
Lance
5/27/2005 7:43:08 AM
I'm not sure its possible, but I have never found a need for it either.


Typically, you can solve most problems by simple dependency inversion
so that your code is called when generating the resultset. For
filtering, call your code from the "Filters" tab of the Dataset; for
modifying values, create a custom field in the resultset that passes
other field-values into your Function(s), OR if you need more advanced
logic, you can set the Command Text to an expression which calls your
code function and returns back a piece of dynamic SQL. (E.g.
"=Code.MyFunction(Parameters!Param1, Parameters!Param2,
Parameters.Parm3, true)" or somesuch)

Give me some more specifics on what you need to do, and I may be able
to give you some alternatives.

Thank you,

Lance Hunt
http://weblogs.asp.net/lhunt/
sysdesigner
5/27/2005 1:57:52 PM
I get an error when i put this in the command text query

"=Code.TestFunction()"

It says that it can't find the stored procedure, even though the command is
set to "text".

Thanks,
Shawn


[quoted text, click to view]
Bryan Avery
5/31/2005 4:36:01 AM
Hi Lance,

I have an two images in a database that I am trying to use depending on
an expression, but I can't seem to get the Expression generator to
selectively select the image (record) I am after from the database, I
get either =First(Fields!Images.Value, "Images") which come back with
the first, or =Fields!Images.Value.

Any ideas?
AddThis Social Bookmark Button