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

sql server reporting services : Custom code


TechnoSpyke
1/27/2005 3:34:11 PM
I have a report parameter that gets its value from a custom assembly. I am
not sure when or where to call the assembly. The examples show that I can
override the OnInit() method of the report.

Protected Overrides Sub OnInit()
m_myClass = new MyClass(User!Language, Paramters!Territory)
End Sub

Aside from the OnInit(), what other methods can be overriden from the report
code window?

TIA.

Alexandre Mineev [MSFT]
1/28/2005 9:32:12 PM
You need to call your class from the default value of the report parameter,
right?
If yes then you probably need to have your class initialized before it is
called.
This can be done either thru Code (define public member variable of your
class, instantiate the class in OnInit) or you can specify member variable
name and class name in the classes tab. In this case report server will
automatically create member variable and instantiate your class using
default constructor (constructor with no parameters).
In both cases you can get your class instance using Code.member_variable
syntax.

--
Alex Mineev
Software Design Engineer. Report expressions; Code Access Security; Xml;
SQE.

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

[quoted text, click to view]

AddThis Social Bookmark Button