[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Deploying Custom assembly in SqlReport2000

Posted on 2006-03-31
10
Medium Priority
?
736 Views
Last Modified: 2008-02-01
Hello Experts,
Need urgent help.......
I created a custom assembly in vb.net

Imports System
Imports System.Security

Public Class CustomUserId
    Public Shared Function GetUserId() As String
        Dim sName As String = (Principal.WindowsIdentity.GetCurrent).Name
        sName = LTrim(sName)
        sName = RTrim(sName)
        Return LCase(sName)
        'Return "Test"
    End Function
End Class

I added the reference to this DLL in my report. Then I added textbox in my report. Added an expression:=CustomCodeHPCBM.CustomUserId.GetUserId()
Then Put the DLL in C:\Program Files\Microsoft SQL Server\80\Tools\Report Designer(on my local machine)
Then I previewed the report. It works fine.Textbox showed the userId.
Next I put the DLL in
C:\Program Files\Microsoft SQL Server\MSSQL\Reporting Services\ReportServer\bin(In the report server)
I deployed the report.Then when I start the report,Textbox shows #Error.

Any idea why this is happening?

0
Comment
Question by:justin11
  • 4
  • 4
8 Comments
 
LVL 7

Expert Comment

by:ABaruh
ID: 16373088
It's probably a permissions setting

change the PermissionSet for Report_Expressions_Default_Permissions in
rssrvpolicy.config to FullTrust
0
 

Author Comment

by:justin11
ID: 16375384
Thanks,
Is it under configuration?
0
 
LVL 7

Expert Comment

by:ABaruh
ID: 16375977
Rssrvpolicy.config is in c:\Program Files\Microsoft SQL Server\MSSQL\Reporting Services\ReportServer

Open it in notepad and do a search on the phrase Report_Expressions_Default_Permissions

The PermissionSetName should be FullTrust
0
Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

 

Author Comment

by:justin11
ID: 16380975
Hello,
That worked...

But is there a way I can only give permission to this specific application instead of all the application
0
 
LVL 7

Accepted Solution

by:
ABaruh earned 2000 total points
ID: 16382953
what kind of permission?  Specifically, what are you trying to do?
0
 

Author Comment

by:justin11
ID: 16383478
instead of setting the default permission to Full trust can I do something like this: I think this is for the specific report
right?

<CodeGroup
class="FirstMatchCodeGroup"
version="1"
PermissionSetName="FullTrust"
Name="MyCustomAssemblyCodeGroup"
Description="A special code group for my custom assembly.">
<IMembershipCondition
class="UrlMembershipCondition"
version="1"
Url="C:\Program Files\Microsoft SQL Server\MSSQL\Reporting Services\ReportServer\bin\Simple.dll"/>
</CodeGroup>            
0
 
LVL 7

Expert Comment

by:ABaruh
ID: 16384715
yep, you can do that
0
 

Author Comment

by:justin11
ID: 16386553
What should I specify in class and name:

My project name is: CustomCodeHPCBM
Class Name is:CustomUserId
Method: GetUserId()
Will it be something like this:

<CodeGroup
class="FirstMatchCodeGroup"
version="1"
PermissionSetName="FullTrust"
Name="CustomCodeHPCBM"
Description="A special code group for my custom assembly.">
<IMembershipCondition
class="CustomUserId"
version="1"
Url="C:\Program Files\Microsoft SQL Server\MSSQL\Reporting Services\ReportServer\bin\CustomCodeHPCBM.dll"/>
</CodeGroup>  
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hi, In my previous Article  (http://www.experts-exchange.com/Database/Reporting/A_15199-Introduction-to-Microstrategy.html)I discussed some basic understanding of Microstrategy that how we can get in Intro of Microstrategy (MSTR). Now it's tim…
Hello, In my precious Article  (http://www.experts-exchange.com/Database/Reporting/A_15280-Create-Project-in-Microstrategy-Part-I.html)we saw the Configuration part for Microstrategy which included Metadata Creation and DataSource Preparation as …
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses
Course of the Month18 days, 10 hours left to enroll

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question