Tuesday, March 27, 2012

diploying reports on browser with custom assembly

Hi friends,

We are using SQL Server Reportin Services 2005 (SSRS) for development of our reports instead of Crystal Reports. As per our clients requirement we want to make all reports dynamic eg. whatever background color user select should appear for that report etc etc.

So for this we have written one function and created DLL for that. Now we are refering that DLL in all our reports as Assembly Name in Reports \ Report Properties \ Referance. We have stored that DLL at two different locations also

C:\Program Files \Microsoft SQL Server\MSSQL.3\Reporting Services\ReportServer\bin

C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies

so when we run our reports from Preview tab DLL is just wroking fine.

Then added the permission code in rspolicy.config file as follows,

<CodeGroup class="UnionCodeGroup"
version="1"
PermissionSetName="FullTrust"
Name="MyNewCodeGroup"
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\MyAssembly.dll"/>
</CodeGroup>

But when we deploy all our report on Brwoser and when we try to execute them from browser DLL is now working i.e no function value is working. only normal report without styleing is coming.

So can anyone help me out coz this is very argent

any help will be greatly appreciated

Custom assemblies always run with Full Trust in designer preview, so it's not suprising the code works there.

It's likely that you placed your codegroup in the wrong place inside the rssrvpolicy file...here's a blog post on same:

http://blogs.msdn.com/bimusings/archive/2005/06/16/429795.aspx

The info around "placement" in the policy file is still valid even though this post is about SSRS 2000

|||

hi Russell,

thx for help,

but whatever suggetions u hv told I have implement them.

ie changing the posting of full trust in *policy.config files ,

placing the DLL in Report Desinger folder etc etc but still no luck

I still cant see the effect of my DLL on browser.

are there any changes require to be done in Reporting Services Configurations ?

one thing I want to tell you is that while installing the Reporting Services I have given the Path in D folder and not C folder so , my 80 tools folder now is in C folder and 90 tools folder in D folder so because of this anything is going wrong ?

plz help me out if u can

sandeep

|||

Hey Sandeep --

What I was saying in my earlier post is that it doesn't matter if you put the "new" code group into the *.policy.config file if you place it in the wrong area of the file (or is this what you mean when you used the world "posting").

You have to put the code group in just the right spot for it to be used...If you put it in the wrong place, no errors will alert you that you've done something wrong, but your assembly won't get FullTrust, and therefore fail to execute.

|||

hi russell,

as u said in ur first post I have pasted my code in the place where u hv mensioned as followes

// Your Stuff goes here….
</CodeGroup>
</CodeGroup>
</PolicyLevel>

but still its not working

is there anything that we need to do with Report Server Confirguration ?

plz guide me

sandeep

|||

I've put my code-groub just below

<CodeGroup class="UnionCodeGroup" version="1"
PermissionSetName="FullTrust">
<IMembershipCondition
class="UrlMembershipCondition"
version="1"
Url="$CodeGen$/*"
/>
</CodeGroup>′

I think I've seen this "position-advice" somewhere in the docs but I can't find it any more ;(
[edit] found it: http://msdn2.microsoft.com/de-de/library/ms152828(SQL.90).aspx

Are you sure the path is correct?! In you very first post you wrote

..
So for this we have written one function and created DLL for that. Now we are refering that DLL in all our reports as Assembly Name in Reports \ Report Properties \ Referance. We have stored that DLL at two different locations also

C:\Program Files \Microsoft SQL Server\MSSQL.3\Reporting Services\ReportServer\bin

C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies

so when we run our reports from Preview tab DLL is just wroking fine.

Then added the permission code in rspolicy.config file as follows,

<CodeGroup class="UnionCodeGroup"
version="1"
PermissionSetName="FullTrust"
Name="MyNewCodeGroup"
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\MyAssembly.dll"/>
</CodeGroup>
....

I can't see the MSSQL.3 anywhere in your URL

Have you looked at the log-files?|||

I have added the code group as follows,

<CodeGroup class="UnionCodeGroup"

version="1"

PermissionSetName="FullTrust"

Name="MyNewCodeGroup"

Description="A special code group for my custom assembly.">

<IMembershipCondition class="UrlMembershipCondition"

version="1"

Url="D:\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportServer\bin\ReportStyle.dll"/>

</CodeGroup>

and location is also same as u hv mentioned

but still I cant see the reports on browser

so where exactly I am going wrong ?

plz help me

sandeep

|||Have you looked at the Logfiles? You should find them here:
D:\Microsoft SQL Server\MSSQL.3\Reporting Services\LogFiles
In my case I included system.data.oracleclient in my dll wich didn't work as long as I didn't call the assert method of OraclePermissions..
So the logfiles should give a hint of whats going wrong..

|||

hi binny,

i hv deployed ones again. and saw reports on browser still it is shwing without DLL effect so i checked all log files. but they all are old log files and no related information is there

sandeep

No comments:

Post a Comment