Wednesday, March 28, 2012

Is it possible to localize Report Manager using satellite assembly

Hi,
I'm trying to localize Report Manager (Reporting Services 2005) by
implementing my own Finnish version of the resources in
ReportingServicesWebUserInterface.dll assembly.
I have the satellite assembly in the following folder:
C:\Program Files\Microsoft SQL Server\MSSQL.6\Reporting
Services\ReportManager\Bin\fi
I used the Assembly Linker tool (al) to create the assembly and used the
ReportingServicesWebUserInterface.dll in the base directory as the template.
I tried delay signing the assembly using my own key. Then I used the Strong
Name
Utility (sn) to add the assembly to skip verification list.
For some reason my satellite assembly is not loaded when I set my web
browser language to Finnish. If I set it to German it works ok. I have very
little .NET experience by I suspect that is due to the fact that the
sattelite assembly should be signed with the same key as the base assembly?
So is it possible to implement your own language version of the
ReportingServicesWebUserInterface.dll satellite assembly to use it to
localize report manager?
If it is possible is there any document that describes the process and the
related security issues?
If it's not possible then please tell me so that I can make a decision about
developing a new report portal web application. We would like to use the
Report Manager if we only could localize it.
I tried emailing the Gold Certified Partner support address, but got no
answer. Any assitance will be greatly appreciated.
Thank you,
Juho Salo> I tried emailing the Gold Certified Partner support address, but got no
> answer.
Scractch that. They actually called me instead of emailing, but my phone was
not on, stupid I know. I will post the answer here when I get it.
Juho|||I have received a very decisive answer from Microsoft.
Quote:
"You have asked if it is possible to implement your own language version of
the ReportingServicesWebUserInterface.dll satellite assembly to use it to
localize report manager. Unfortunately, this is NOT possible. The Report
Manager resource assemblies MUST be signed with a Microsoft key."
So if anyone else is wondering, if you need to localize Report Manager
easily it's not possible (unless ofcourse you live in one of those
priviledged countries that are provided with localization for it).
I'm off to writing my own report portal application then.|||I actually came up with a solution that is a bit of a hack but will do nicely
and let's me use the Report Manager. Just add the code below to all of the
aspx pages under the Report Manager\Pages folder
<script language=cs runat=server src= "Dictionary.cs"/>
<script language="C#" runat="server">
void Page_LoadComplete(object sender, EventArgs e) {
TranslateControls(Page);
}
private void TranslateControls(Control c)
{
Type t = c.GetType();
System.Reflection.PropertyInfo p = t.GetProperty("Text");
string s;
if (p != null) {
s = (string) p.GetValue(c, null);
if (s!= null ) {
if (s.Length > 0 ) {
if (p.CanWrite)
{
p.SetValue(c, Dictionary.Translate((string) p.GetValue(c, null)), null);
}
}
}
}
foreach (Control child in c.Controls)
{
TranslateControls(child);
}
}
</script>
Then just create some sort of implementation for the Dictionary class in the
Dictionary.cs file. The code above is not the final version but it works.
Comments are welcome.

No comments:

Post a Comment