Using custom Assemblies with SQL Server Reporting Services.

In almost every Reporting Services class I teach, I get basically same questions. One of the most popular questions is how do I call a method in a custom assembly from my report.  Here are step By step, instructions to do this.

 

1.       Using Visual Studio Create a new Class Library(VB or C#) I am going to name my Project SSRSAssembly

2.       Rename your Class1.VB or Class1.CS to ComplexCalculations, presumably you would have your re-usable methods in this class

3.       For next step, please use your imagination, pretend the following function has a few lines of code with loops possible calls to other assemblies and does some complex calculations (instead of just returning the square value of the parameter being sent to it.

(a)    Add the following Method to your Class

VB

Public Function SquareMe(ByVal i As Integer) As Integer

        Return i ^ 2

End Function

C#

public int SquareMe(int i)

{

    return Math.Pow(i, 2);

}

    

4.       Build Your project .

5.       Open your Report project.

(1)    Access your report properties from the Reports menu option

(2)    Click on the reference tab and add a reference to your assembly by browsing to it.

(3)    Define the class name ( in my example I called my class  ComplexCalculations)

(4)    Provide an Instance name.

6.       In a textbox within your dataregion where you want to display the result of your call, enter:

=Code.MyInstance.SquareMe(Fields!SickLeaveHours.Value)

7.       Copy your Custom dll to Report Server bin folder (default location is C:\Program Files\Microsoft SQL Server\MSSQL.x\Reporting Services\ReportServer\bin)

8.       Open rssvPolicy.config located in C:\Program Files\Microsoft SQL Server\MSSQL.x\Reporting Services\ReportServer\bin.

9.       After the last <CodeGroup .. add

<CodeGroup class="UnionCodeGroup" version="1" PermissionSetName="FullTrust" Name="SSRSAssembly" Description="reportHelperLib. ">

                <IMembershipCondition

                class="UrlMembershipCondition"

                version="1"

                Url="C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportServer\bin\SSRSAssembly.dll"

/>

              </CodeGroup>

10.   Note you might have to change the Name and the URL.

Comments

# re: Using custom Assemblies with SQL Server Reporting Services.
Left by zombo on 9/23/2008 8:20 PM
# re: Using custom Assemblies with SQL Server Reporting Services.
Left by fdsafa on 10/26/2008 2:46 PM
# re: Using custom Assemblies with SQL Server Reporting Services.
Gravatar We specialize in laptop battery,laptop AC adapters. All our products are brand new, with the excellent service from our laptop battery of customer service team.
the most convenient and cheap replacement battery online shop in uk. We specialize in laptop batteries,laptop AC adapters.
All our laptop AC adapters are brand new, with the excellent service from our customer service team.
the most convenient and cheap battery online shop in uk.
You can find some battery and adapter from here is very cool.
Left by laptop battery on 11/17/2008 2:01 AM
# re: Using custom Assemblies with SQL Server Reporting Services.
Gravatar What do we really mean bybuy Warhammer gold becoming open? Well,Warhammer gold trying to talk about yourself in such a way that buy Warhammer gold something of the inner person,Warhammer gold that is you, is communicated to others might be one way of being open or at least thinking about being open. aoc goldThat inner person is aoc golda complex person who has a variety of thoughts and also feelings. So,eq plat wanting to share with lord of the ring gold other people these inner feelings and these inner thoughts is one way of becoming open. ,Being open is a kind of invitation to others.EverQuest gold What you share about yourself should lotro goldencourage others to come in, so to speak and make contact with you. Maple Story MesosTo involve themselves with you. Being open is difficult.MapleStory mesos It makes us feel vulnerable, psychologically naked and usually anxious. But it also is important in terms of really Maple Story mesoletting others get to understand how we think, how we feel and what we believe.Maple Story Meso We often hide our inner thoughts and feelings because kamas dofuswe're concerned how well excepted they'll be by other people.maple Story Mesos But we also shut out other people from knowing and accepting us by not being open.MapleStory mesos We also are really saying we don't fully accept ourselves if we won't buy ffxi gilbe open with others. We're denying ourselves that chance to speak out, dofus kamasto declare our inner thoughts and feelings. Final Fantasy XI gilIt's up to you to decide just how you're lotro goldgoing to talk about yourself and what you're going to say. ffxi gilTelling somebody lotr gold where you bought those new pair of shoes might be one way of being open. <br/>
Left by deng on 11/19/2008 7:10 AM
# re: Using custom Assemblies with SQL Server Reporting Services.
Gravatar Physical force or threats may make children do as wow goldthey're told in the short term but their compliance will last only as long as the threat is relevant. wow goldThen they will go back to doing what they wanted to do in the first place.
Left by hobg on 11/19/2008 7:11 AM
# re: Using custom Assemblies with SQL Server Reporting Services.
Gravatar In truth, the economy is slowing more markedly than these (highly suspect) official figures suggest. wow goldMany economists say that China has an institutionalised bias to over-reporting growth at the bottom of a cycle and under-reporting it at the top, to reduce the volatility of the numbers.
Left by mei on 11/19/2008 7:12 AM
# re: Using custom Assemblies with SQL Server Reporting Services.
Gravatar <br>Fortunatelyage of conan goldit was never my goal to supplant their real father in their affection. age conan goldThey always called me Dan and were sweet to me,age of conan power leveling but there was a gap that would not close;aoc power leveling they were just a bit reluctant to engage in things with only me.age conan gold One day a couple of monthssintosour life together, anarchy online creditsthe kids and I were riding our bicycles around the neighborhood.anarchy online credit David started to fuss about being tired, then hungry,archlord gold then bored, and Jane provoked him by assuming an air of maternal superiority.buy archlord gold An argument broke out, and for the first time I spoke to them sternly. Listen, City of Heroes InfamyI said, you don't have to think of me as your father -coh influence I'm not interested in replacing him. But I am married to your mother.City of Villains infamy I know you didn't have any choice in this matter, but here we are, cov infamyliving together.Gaia Online Gold As an adult I have a responsibility to look out for your wellbeing,gaia gold which includesshavingssome fun together.ge money So I'm probably going to act like a parent until you're grown up.granado espada vis We might as well find ways to get along. So,granado espada gold right now, what do you want to do: go home or ride your bikes?They both chose to ride on, and we had a great time that afternoon.hellgate london palladium I think they were relieved to hear me say that I was not trying to replace their real father.<br/>
Left by dhm on 11/19/2008 7:13 AM
# re: Using custom Assemblies with SQL Server Reporting Services.
Gravatar People who truly love each other treat their mmporpgmates with absolute trust. Some husbands and wives tormentonline games themselves with groundless suspicions. If you look for trouble you will find it every time.diablo 2 cd keyPeople who truly love look forward to their relationship growing more meaningful and precious. They have hope. Which is an attitude that happily anticipates the good.diablo 2 cd key It isn’t being blind and denies there are problems, but it does look beyond the problems.daoc gold People who truly love each other do not allow their problems to rob them of their happiness.Remember there is no failure in love, because once you tell somebody who you love,daoc plat that you love him/her, then you have already succeeded in love.
Left by zhuqian on 11/24/2008 8:30 PM
# wow gold
Gravatar This unit wow gold would be just a little bit faster than a seige tank and would have the role of destroying enemy armor or heavy units. It would be able to counter a bunch of wow gold siege tanks or ultralisks or something. It would attack with three cannons, 1 mounted on top and two mounted on the sides. The Armor Annihilator would have wow gold strong damage against heavy targets and would be a good counter to heavy units as the armor annihilator would move just a tiny bit faster than most heavy units move wow gold so it could hunt them down and destroy them. However this unit may seem overpowering but small units such as a marine, zealot or zergling could easily destroy this unit. The wow gold three cannons arent actually really aimed, they are mostly just positioned at a target and then the guy inside hits the "fire button" so the three cannons hit in wow gold a triangular raidus, which would be most parts of any heavy unit, however probably only the main cannon would hit a lighter unit such as a marine or reaper making wow gold it easily counterable to light units.The Terrans realizing that many of their stronger heavy units such as wow gold the siege tank and the thor were very usefull brought up other things, what if when two Terran armies collided, the enemy army would use Thors and Siege Tanks. This question brought up a bunch of vehicles wow gold and ideas however one stuck up above the others, one group of terrans brought up a specialized heavy unit destroyer with cannons that would fire in a triangular radius, thus wow gold damaging a lot of a heavy unit or vehicle. It was tested against Thors and Siege tanks and proved to be invaluable in destroying these units, as a wow gold pack of them could easily bring down a group of siege tanks, even a larger group brought down a group of three Thors. The Dominion took to the wow gold idea but realized that this unit would be useless against protoss and zerg.
Left by aijiaen on 11/26/2008 3:46 AM
# re: Using custom Assemblies with SQL Server Reporting Services.
Gravatar I've learned that dofus kamas attacking players from the back means they can't block, parry, or dodge. Is this the same with mobs?It's supposed to be the case, however kamas dofus I'm not sure if it always works that way in practice.i have never heard anything about hitting a player from behind making it so they cant dodge or parry, in raids Lord of the Rings Online Gold melee classes never go behind there targets so i assume there is no such thing and its the same for mobs.Yes, players can block parry or dodge attacks from behind. Even against LOTRO Gold a rogue ambushing from stealth that the player wasn't even aware LOTR Gold that they were there. The same applies to NPCs. The only time positioning matters is that the target needs to be in fly for fun penya front of you, and some rogue and druid catform abilities require you to be flyff penya either behind or in front of your target.Players CANNOT Dodge block or parry attacks that come from behind them.NPCS CANNONT BLOCK OR PARRY buy flyff gold attacks that come from behind them.NPCS CAN dodge attacks from behind BUT players cannot.this is why in a raid all flyff money melee classes need to attack from behind the boss in order to reduce the amount of parries.I understand that this forum is for beginners.but Final Fantasy XI gil when a beginner asks a question, please understand final fantasy 11 cheap gil what you are talking about before you spread misinformation.keep in mind that you can MISS from all directions. So if you are a rogue and you ambush a player, they wont BLOCK it, but you ffxi gil can MISS your attack. So the number of times my rogue has had buy ffxi gil attacks parried or dodged from behind their target while in stealth never happened. Got it. that's because you didn't position buy Warhammer gold yourself right!if you stand inside the mob or too close, your weapons can go through it, and you will get parried etc.NPCs can indeed Warhammer gold dodge from behind. I've had them dodge my backstabs and mutilates a few times, and those can only be done from the back, so it's not a question of them "turning around just in time" either.Those cases buy Warhammer gold are clear to my mind because every time it happens, I ask myself "how the hell do you dodge an attack you can't even SEE?"Melee DPSers in your raid are playing Warhammer gold very badly, increasing the damage to your tank and decreasing their own damage output.
Left by aijiaen on 11/26/2008 3:47 AM
# re: Using custom Assemblies with SQL Server Reporting Services.
Gravatar The season finale of the NHRA's Powerade High pressure blower Series began with Pedregon holding a 12-point Industrial fan edge over Wilkerson and a 39-point Industrial blower lead over Hight.A near capacity crowd -- perhaps Commercial blower sensing that the title could be decided early -- had maneuvered ugg boots around shuttered freeways and other roads closed by the Wholesale Jewelry Southern California brush fires pressure blower and arrived on time for the pressure blowers opening round.It began with Pedregon advancing fans to the semifinals uggs by knocking out Jerry Toliver.Then Wilkerson lost blowers to 14-time champion John Force.
Left by uggs on 11/27/2008 4:50 AM

Leave Your Comment

Title*
Name*
Email (never displayed)
 (will show your gravatar)
Url
Comment*

Please add 3 and 5 and type the answer here:

Preview Your Comment.