Вопрос

I'm using SQL Server Data Tools 2012 in Visual Studio. I have a Reporting Services report containing a table with some columns that are optional, based on selections from a multivalued parameter, and other columns that are required.

Among the required columns, the first two - call them SalesOutlet and ProductType - are to be used to create separate worksheets when downloaded to an Excel spreadsheet. For instance, I want a worksheet for each of these combinations:

  • "Springfield" + "Books"
  • "Springfield" + "Music"
  • "Portland" + "Books"

... etc. Since these columns are used to create the separate worksheets, it would be redundant to show them in the sheets, so I want to hide them.

I can create the separate worksheets by making SalesOutlet and ProductType be row groups and selecting page breaks "Between each instance of a group" in the Page Breaks tab of the Group Properties dialog. However, if I then go to the Visibility tab and select to Hide the groups, it hides all the columns in my report, since Hide will hide all columns of a group.

How do I use columns for grouping and page break criteria, and hide them in my downloaded result, while still showing their child member columns?

Это было полезно?

Решение 2

It turns out that you can delete the group columns after you've specified them to be used for grouping and page break. You simply right-click on the the handle of the column(s) to be removed and select "Delete Columns" -> "Delete columns only".

Другие советы

Say you have some data like this:

enter image description here

And a simple report to display the data:

enter image description here

Note that the only column being displayed is Title. However, we are grouping on the other two to create the required group and page breaks:

enter image description here

Don't forget to set up the group-level PageName property to something like:

=Fields!SalesOutlet.Value + " " + Fields!ProductType.Value

To get named worksheets:

enter image description here

This gives the required results of grouping/paging on columns that aren't actually displayed in the report:

enter image description here

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top