I added a reference to a custom assembly in a report services (2008) report. It works great when I call from a textbox (e.g, =Assembly.Class.Function() ), but when I wrap it in a custom code block:
Function GetString(ByVal key as String) as String
return Willow.Reporting.Localization.Resource.Get(User!Language, "WAR", "Title", key)
end function
I get the build error “Reference to a non-shared member requires an object reference.”.
The C# class and functions are static.
as a test, I also created a non-static vrsion of the class, created an instance, and accessed it through the instance name in the custom code, but no luck either.
is it possible to call a custom assembly from the code block in reporting services?
the VS IDE loads the assembly only once, on load — so you have to close/reopen VS each time you make an assembly change (removing the reference and resetting didn’t work either)
you can use both static calls and instance methods too and it works fine from embeded code, e.g,: