Custom Assemblies | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Custom Assemblies

Hi, As part of my investigation into Reporting Services I’m looking at custom assemblies, but having tried to follow the help I’m a little stuck on how to get it to work within my report. 1) I have created my assembly and copied an instance of it to both the C:program FilesMicrosoft SQL ServerMSSQLReporting ServicesReportServerin and C:program FilesMicrosoft SQL Server80ToolsReport Designer as specified by the help 2) I have edited both the config files specified in the help, namely RSReportServer.config and RSReportDesigner.config, and added the <CustomAssemblies> element. However, the help stated it should already be present and commented out, but it was not so where exactly do you need to add it, at present I’ve tried it as the last element after </Configuration> and also within <Extensions> on both files 3) Within the designer I have added a reference to the assembly I copied to the C:program FilesMicrosoft SQL Server80ToolsReport Designer directory, and since I’m using a shared function I’ve not added the class instance information because the help states you don’t need to 4) Within the report I’ve referenced the method using namespace.class.method, again as specified in the help I can no longer preview the report due to a configuration error and when deployed the result of the function call is error. I know the function works because I’ve previously used it as embedded code within the same report. I’ve searched the net and seen a few people saying they have got this functionality working, but I’ve not seen a proper step-step example of what you need to do and the Microsoft help is useless, so anyone who has got this working can you let me know how and highlight anything I’ve done wrong above or missed out. Many thanks in advance, James
After playing some more it seems the Microsoft help is just plain lying, probably written against a much earlier version. Basically none of the config changes are required, you simply copy the assembly to both the Server/Designer locations, add a reference in the report, and simply call as outlined in the help and it actually works, grrrrr Microsoft documentation [<img src=’/community/emoticons/emotion-6.gif’ alt=’:(‘ />!]
JEGBIE,
I read your posted message on SQL-Server-Performance.com about referencing custom assemblies from MS Reporting Services and I did just as you did by editing both the config files specified in the MSDN help, RSReportServer.config and RSReportDesigner.config, and added the <CustomAssemblies> element to both files. I then browsed to the file in the bin folder inside the report server folder. I also did not add a the class name and intance because the help says its not necessary. Then, on the Layout page I typed in the text box Namespace.Class.Method(Fields!EnteredBy.Value). When I run the report, the field resolves in an error where the new value should exist. I get the error "[BC30469] Reference to a non-shared member requires an object reference."
I saw that you resolved this, but I am not sure what you did. I am new with MS Reporting Services and I am struggling finding the problem. CAN YOU HELP!
Thanks,
DON
[V]
]]>