Adding a legend to a Reporting Services report

Posted on 2006-04-24
Last Modified: 2008-02-01

I have a Microsoft SQL Server 2000 Reporting Services report using a matrix and using a dataset that gets its contents from a stored procedure. All is working fine, but I have some color-coding used in the report itself and I would like to add a legend at the top.

In Visual Studio .NET 2003, I switched to the toolbox tab on the left hand sidebar and dragged a table to my report. I removed the header and footer, removed a column and added rows and basically made the table the way I want. The problem I have is that the legend is not appearing once, and all the time (as I would want it). Instead it shows up as many times as there are rows in the dataset used by the matrix. How do I make it to work independently from the dataset, the same way as a textbox works for example?
Question by:MUTU
    LVL 14

    Expert Comment

    Remove the dataset from the table, as I'm guessing its the same one as your Matrix.  Create another datset with just SELECT GETDATE() and then use this in your table.  This dataset will return one row of data, so your table will only have one detail row.
    LVL 1

    Author Comment

    But that creates another hit to the database. Isn't there a neat way to do this?
    LVL 14

    Accepted Solution

    A table requires a dataset. Using SELECT GETDATE() is a simple way to create a dataset.  Other option would be to use textboxes.
    LVL 1

    Author Comment

    Thanks. For the record, I did SELECT 1;

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    1. Set up your parameter at the report level as usual, check the box Multi-value, and set the Data Type to String 2. Set the Stored Procedure Parameter to varchar(max)  --<---- This part here is the key to it's success Example:    @cst_key var…
    Problem Statement In an SAP BI BO Integration project when a BO universe is built on a BEx query, there can be an issue of unit & formatted value objects not getting generated in a BO universe for some key figures. This results in an issue whereb…
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now