Showing posts with label custom. Show all posts
Showing posts with label custom. Show all posts

Tuesday, March 20, 2012

Problem On Store Report Parameter in Subscription ( by custom UI)

I wrote a interface on my website about create/update subscription .
when I get the parameter back by using GetReportParameters ()
the value was swap
for example:
I have 8 reportparameter: tcust, fcust, fdnnum, tdnnum, fdept, tdept, fairline, tairline.
all of them are string
when I create the subscription by:
tcust 1
fcust 2
fdnnum 3
tdnnum 4
fdept 5
tdept 6
fairline 7
tairline 8

then I get back that subscription
the value will be :
tcust 2

fcust 3

fdnnum 8

tdnnum 5

fdept 1

tdept 7

fairline 4

tairline 6

are there any order for storing the ReportParameter[] ?
thank youYou should not rely on order. ReportParameter has property Name which can be used to identify the parameter. See sample code at http://msdn2.microsoft.com/en-gb/library/microsoft.wssux.reportingserviceswebservice.rsmanagementservice2005.reportingservice2005.getreportparameters.aspx

Friday, March 9, 2012

Problem loading satellite assemblies in RS2000

Hi,

I have a problem calling Assembly.GetSatelliteAssembly inside a custom assembly referenced by a report. This assembly is used only for localization, and all it does is load the appropriate localized satellite assembly and pull a translated string out of it. The problem doesn't manifest itself if the report is viewed by a user that has higher privileges, but for a user with only the Browser role the GetSatelliteAssembly method throws a System.IO.FileLoadException "Access is denied: Resources.resources" (the custom assembly is called Resources.dll).

The assembly has no strong key and has the AllowPartiallyTrustedCallers attribute in AssemblyInfo. I did set fullTrust in the rssrvpolicy.config, like this:

<CodeGroup
class="FirstMatchCodeGroup"
version="1"
PermissionSetName="FullTrust"
Name="TestCodeGroup"
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\Resources.dll"/>
</CodeGroup>

I even tried asserting a FileIOPermission on the satellite dll prior to calling GetSatelliteAssemblies: the assert succeeds but the problem remains.

I'm using RS2000 SP2 with the whatsit hotfix (build no. 1402, IIRC). Note that this exception doesn't seem to appear if I try the same report in RS2005, but migrating is currently not an option.

What should I do? If this is a bug in RS2000 is there a workaround? Any suggestions are welcome.

Thanks in advance!
The old rule has proven true again, the answer comes by itself once you post the question to others...

The fusion log showed that GetSatelliteAssembly searches for the satellite dll in the ReportServer/bin folder, but also in Temporary ASP.Net Files... So, one part of the solution was to give the user modify permission on it. The other part was to give him read permission on the satellite assembly - and this is strange because the main assembly doesn't require extra permissions, but the satellite assembly does.

I'm sure I'm not seeing the big picture here, so if someone can shed any amount of light () on this issue, it would be appreciated.