开发者

How to send parameter List<string> from rdlc file to static method in customer assembly

I use object datasource in my reporting services .rdlc file. One of the properties i开发者_StackOverflow中文版n the object is of type List<string>. I try to send this as a parameter to a static method in a custom assembly like this:

=MyModule.ReportCode.GetListItemString(Fields!TestList.Value,0)

but it does not work, I only get "#error".

Does anyone know what I have to do to make this work?


You can work on the entire Fields collection and extract your list inside your custom assembly.

Yoo can create a function in your assembly like:

public static double MyFunction(Fields pFields)

and access the columns using :

if (pFields["myColum"] != null && pFields["myColum"].Value != null) ...

In the report you can call the function using :

Code.MyModule.MyFunction(Fields)

Remember to link the Microsoft.ReportingServices.ReportProcessing.ReportObjectModel assembly.

Hope it helps..

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜