Centralising Reporting Services Stylesheets

  • Thank you very much for your help. My problem was: the configuration for build project was in release mode instead of debug. My custom code works now. Thank you very much. Irina.

  • Unless I am missing something, this does not work in the header or footer of the report. Would love to be proved wrong but if so it does limit the applicability of this approach

    Pete

  • Sorry, Footer is O.K. - header no luck - same sort of restriction as for db images. Come on M$!

    Pete

  • Hi Adam

    This is a fantastic article and just what I'm looking for to reduce the workload in creating many reports while ensuring a consistent look and feel. I've worked through the steps for the data driven option and can compile and preview in Visual Studio 2005, however when I try to deploy to the report server I get:

    The Color expression for the textbox ‘textbox1’ contains an error: [BC30456] 'DataStyleLibrary' is not a member of 'DynamicStyleLibrary'. (rsCompilerErrorInExpression)

    I have checked that the dll is referenced in report properties references tab, and as I said, this previews fine from VS so I believe the dll is fine. My knowledge of vb programming is limited so I'm now stuck for solutions. Can you help please?

    Susan

  • Hi Susan,

    This could mean that the Dll is not deployed correctly - you will have to make sure that you are copying it to the right directories!

    Good luck,

    Adam

  • Wow that was a speedy response.

    The 2 directories I'm deploying it to are

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

    and

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

    Is this correct, and is there anything else I need to do apart from copying the dll's into these directories. Sorry for the lack of knowledge, I dont often deal with dll's

    Much appreciated

  • I really like the ideas here. I've worked through the article and am having an issue I believe reported in the previous post... I build the project, copy the .dll to the listed locations, add the reference to the report project, edit the code to get the color from the .dll. When I go to preview the report, I get a "cannot find the file specified" error. I have re-checked the paths to the copied .dll and am still getting this error.

    Any ideas on what I'm missing?

    I am using BIDS sql Server 2005 and VS 2008 on my local workstation and the server is SQL Server 2005 Enterprise.

    Thanks in advance,

    Scott B Dragoo

    Database Administrator

    Tripplite

    Scott B Dragoo
    Enterprise Architect
    Vitality Group
    http://www.thevitalitygroup.com

  • Tried the custom assembly with SQL Server option - works great in Visual Studio but just produces #Error and creates security violation about invalid password for IWAM account on production server. Why it's even trying to use the IWAM account is a mystery.

  • Hi All,

    I am bafffled on this one - I cannot make it not work at all - but will keep trying!

    Adam

  • Hi All

    Just thought I would update you with a development. Whether its significant or not remains to be seen, but I went back to my class project and changed the assembly version to 1.0.0.1, rebuilt it and deployed into the relevant directories. It now lets me run locally and works, also now lets me upload to the report server successfully and runs the report. However, the style sheets dont work. There is no error, just runs the report but doesnt apply the styles. Weird!

  • Does anyone know if we can use a config file for the connection string instead of putting it in the actual vb file? If this is possible, when we deploy the dll, do we also deploy the config file in the same directories?

    In some of those articles explaining how to extend RS, they say to registar the assembly by making an entry in certain RS config files. Why don't we do that here?

    BTW, great article. It was easy to understand and I liked how each example built on itself.

    Thanks!

  • Hi Misskittyt,

    I think that this is possible, but I have not tested it. If you try this out do let me/the sqlserver.com community know, as it is an interesting way to go.

    Thanks,

    Adam

  • You need to register the DLL with the report. In the report designer, click on Report >> Report Properties then click on the References tab. This is stated in the article.

  • When I run this, I get the following error:

    [rsRuntimeErrorInExpression] The Color expression for the textrun ‘textbox1.Paragraphs[0].TextRuns[0]’ contains an error: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

    I tried adding the following code:

    Dim Permission As New System.Data.SqlClient.SqlClientPermission(System.Security.Permissions.PermissionState.Unrestricted)

    Permission.Assert()

    But that didn't work...

    I'm currently running this on my VISTA machine, but would like to deploy it to a real server after I get it working.

    Any help would be greatly appreciated 🙂

  • Hi there,

    Again, one I have never met - and I developed & tested first on a Vista box. You could start by setting UNSAFE as a VS config just to see if you can get it working, then take things from there.

    Adam

Viewing 15 posts - 16 through 30 (of 70 total)

You must be logged in to reply to this topic. Login to reply