SQL Reporting Services


Relative Path To An External Image In Reporting Services

Well it has been a long time since I got to work with SQL Reporting services but for the most part I really like it. One problem we had was that we have about 20 reports all with the companies logo on it. We could imbed it in each report but that would result in a lot of duplicated logos. So the solution we came up with was to use a relative path to a logo contained in the report assembly… easier said than done. Long story short we finally got it to work with the...

Alternating item color in Reporting services report

    To my supprise Reporting services does not seem to have support for an alternating item color when displaying a table (well that I can find at least). After some playing I came up with a simple little iif statement.Simply set the rows Background color in the properties pane to this:=iif(RowNumber(Nothing) Mod 2, "LightGrey", "White")

SQL Reporting Services: Deploying Reports To Production

I can not beleive how hard it is to deploy reports to production! Its easy for development. Just tell visual studio where the server is and bang! its done. I spent most of today trying to figure out how to deploy to production without having to manually upload each report through the web interface and then manually linking them to my shared data source.I tried writing a vb script to do it which I got 90% their but could not link to a shared datasource. Microsofts documentation of the scripting commands you can do ARE GARBAGE! when trying to set a property you need to send a name...

URL Generation Code

Here is a little method I made to build the query string to pass to reporting services.-showToolbar shows or hides the toolbar with paging, printing, exporting, etc.-showParameters shows or hides the entry fields that allow a user to change what values the report is generated from-properties is a name value collection of parameters that you can supply to the report to generate it instead of the user having to type them into the boxes if ShowParameters is on.Private Function BuildPropertyString(showToolbar as boolean, showParameters as boolean, properties as NameValueCollection) As StringIf _properties Is Nothing Then Return ""Dim sb As New System.Text.StringBuilderif ShowToolbar then sb.Append("&rc:Toolbar=true")if ShowParameters then...

Printing Data

Working on more reports today and discovered that reports print in standard format and I have several I need to print in landscape mode. I finally figured out howgoto report -> report properties -> layoutset the width to be 29.7cmset the height to be 21cmI wish there was an option that just said landscape though!

Formatting Data

One of the cool things I discovered today was that you can use .NET formatting codes when formatting data for output with reporting services1. Right Click on the field2. goto properties3. Check the Custom Radio box and type one inyou can type in 'c' for currency formatting that is locale specific, 'd' for decimal output, or 'p' for percentage.I needed a custom one that had a number formatted by commas with no decimal places so I simply typed in ###,###,### and viola!More info on format stringsStandard numeric formattings: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconstandardnumericformatstrings.aspCustom numeric formattings: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconcustomnumericformatstrings.aspDate time formatting: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemGlobalizationDateTimeFormatInfoClassTopic.asp

SQL Reporting Services: Impression after two weeks

Beefs:1. Report wizard comes back with weird errors when a query is not right. When you run it in query analyzer the actuall issue gets reported and is easy to correct.2. Can not use a stored proc that has multiple result sets.3. The report wizard will not work in some scenarios when using a temp table or a table variable.4. MSDN documentation = the suck5. The designer in visual studio does not remember the parameters entered when switching between layout and preview mode6. I can not find a place to change my rules to metric.7. Does not seem to be any way to...