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

sql server reporting services : [BC30469] Reference to a non-shared member requires an object reference.



Siew Fai
5/26/2005 7:02:52 AM
Hi, I have a custom assembly which I would like to store state between
calls.

In RDL, the following was declared:
<Classes>
<Class>
<ClassName>MyNamespace.MyClass</ClassName>
<InstanceName>MyInstance</InstanceName>
</Class>
</Classes>
<CodeModules>
<CodeModule>MyAssembly, Version=1.0.1972.42338, Culture=neutral,
PublicKeyToken=null</CodeModule>
</CodeModules>

and I have this:

<Code>
Protected Overrides Sub OnInit()
MyInstance.SetFormattingData(Parameters!FormattingData)
End Sub
</Code>

and the code I've created in the assembly is like the following:

namespace MyNamespace
{
public class MyClass
{
public MyClass() {}
public void SetFormattingData(string formattingData)
{
FormattingData = formattingData;
}

// public property FormattingData is also declared.
}
}


The formatting data is intended to be used across calls, so i wanted it
to be initialised when the extension is loaded. But the only thing I
get at the moment is the error on the post's Subject.

Please help!

Siew Fai
MCP
Siew Fai
5/26/2005 5:20:14 PM
I found out.

Actually, there has been a number of discussion on this topic too
(search "OnInit").

Need to qualify the report objects with "Report." when working with
Parameters, Globals, and others.

Siew Fai.
MCP
AddThis Social Bookmark Button