Tutorial: Adding Conditional Formatting into Reporting Services

  • Comments posted to this topic are about the content posted at http://www.sqlservercentral.com/colu

  • Hi Brain Knight,

    I am working in SQL reporting services for the past few months to implement reports module in my project. I have few doubts in that. I have gone thru few sites but no one cleared my doubt. My doubts are

    1. Can we have multiple queries for a dataset.

    2. Can we have multiple dataset for a dataregion.

    The thing is i have to fetch data from various tables to generate the report. (populate in a single table/chart)

    Please help me to proceed.

    Thanks in advance


  • Prasanna,

    I am also new to Reporting Services, but have had a similar issue in populating a chart and table - which only allow a single dataset to be tied to it.  If you cannot build a query using joins to return a single resultset containing all the fields needed for your chart/table, then, you may have to write a stored procedure which returns the data you need from a temp table.  The stored procedure can contain your various queries which populate a temp table - and then have the stored proc return or select those fields needed by your Reporting Services object.

  • I can't use this background color methodogy in a matrix.

    When I use the expression:

    =iif(RowNumber(Nothing) Mod 2, "WhiteSmoke", "White")

    I receive the error:

    The background color expression for the textbox ‘textboxname’ has a scope parameter that is not valid for RunningValue, RowNumber or Previous.  The scope parameter must be set to a string constant that is equal to the name of a containing group within the matrix ‘matrix1’

    How can I modify the expression to resolve this?

    thanks for any help.



  • I am trying to get an answer to this question as well, any help would be greatly appreciated!

  • Did you get a solution to the "The scope parameter must be set to a string constant that is equal to the name of a containing group within the matrix" issue ?#

    Any help appreciated.



  • Thanks Brian, one more step into the world of Reporting Services.

  • Thanks for the articles, Brian.  This is the first time I've used the Reporting Services and I'm anxious to try more.

    One question though.  The reports generated are static, right?  I mean, they don't update or refresh as data changes?  If so, do you plan to write an article on how to create a dynamic report page?  I'd like to create a series of job report pages that would automatically generate reports each morning on the previous night's jobs for each of our servers.


    Also, I'd like to find out how to deploy the report to a different server.  Right now, it deploys by default to your own computer (localhost) which is fine for testing but suppose I want to deploy it to our web server which sits outside our network in a "DMZ"?  Do I need to install anything on the web server to run these reports?  How can I share out the reports I have on my computer with others?


    And how and where do I delete reports?

  • Yea, that RowNumber(Nothing) is really bothering me. Doesn't work for a matrix report, only table. Any ideas? 

  • I have been using SSRS since it came out for SQL 2000.

    1. One of the questions asked for multiple queries per DataSet. In this, one query IS a DataSet, so the answer is no. Do not think of the DataSet as the same one in .NET.

    2. If you want a report to automatically refresh, this is not possible without a call to the server. So, to simulate this, under the "Report Properties" dialog, check the "Auto Refresh" box and set your interval.

    3. As for the RowNumber problem, I am not sure. Have you tried putting it at the row level and just changing what you need there? I have never had a need to do a matrix yet, so I am not sure. It would make sense why it wouldn't work since a matrix is not a listing of data rows.

  • I am using local reports for an asp.net 2.0 application.

    For a chart, the answer to what you use for the RowNumber problem seems to be the Category Group name on the chart. If you look in the xml behind or on the properties page for the value here:- Grouping Name="MainChart_CategoryGroup1"

    Mind, when I tried this with a Pie Chart to set the colours, it built but all the segments were the same colour! So back to the drawing board.

    No other strings that I tried compiled. I am posting this as it may help others with different types of charts.

  • Hello, anyone figured the way to format the color in a matrix?

    The matrix I created has three row grouping but it seems that the color alternates at the grain level and the top level inherits the background color of the last row of its grain. I am using the =iif(RowNumber("group1") mod 2, "WhiteSmoke", "White") in the background color expression of the matrix row.

    Any help would be appreciated, thanks.

  • Hi Brian,

    I do have a question about the changing the color of a hyperlink in reporting services.

    How can I change the color of a font after user clicked on an item in drillthrough reporting in reporting services.

    For example in a Hyperlinked report a user can click on any item and be redirected to the detail reports and be back to the main report.I want to change the color of the selected items , so the user knows that has already clicked on that item.

    Thank you,


  • Try this it worked for me


    Where Fields!NAME.Value is the first column of matrix1_RowGroup1


  • Thanks Buddy

Viewing 15 posts - 1 through 15 (of 18 total)

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