官术网_书友最值得收藏!

Overriding crosstab intersection drill-through definitions

Let us consider an extension of the last recipe. Let us say the users want to see a discontinuous crosstab as main report. Instead of just Order method type as a column, we need to display Order method type and Product line as columns.

The rows display Month. The measure is sales quantity.

The drill-through from the intersection has to go to the appropriate report depending on whether the column is Product line or Order method type.

Getting ready

Create a new drill-through target that accepts Month and Product line as parameters. We will call it Drill-3 from now on.

For the main report, we will use the same crosstab report as in the previous recipe.

How to do it...

In the previous recipe, we saw how to create a drill-through from a crosstab intersection to another report. In this recipe, we want to make it more complex. The drill-through line should be different based on the crosstab column. To complete this recipe perform the following steps:

  1. We will start by creating the discontinuous crosstab on the main report. We already have the Order method on columns. Drag Product line also onto the crosstab, as a column. The report will look as shown in the following screenshot:
  2. Now select the intersection cells under the Product line column.
  3. From its Properties, set Define contents to Yes. This will make the intersection empty.
  4. Unlock the report items. Drag Quantity from the Data Items pane again on the report in this empty crosstab intersection.
  5. You will notice that there is no drill-through for this instance of Quantity as shown in the following screenshot:
  6. Now select this instance of Quantity and define the drill-through definition in the same way as you did previously. The only difference will be that the target report is Drill-3, which accepts Product line and Month.
  7. Run the report to test both the drill-throughs from intersections.

How it works...

In the last recipe, we saw that creating drill-through link from a crosstab intersection needs that we unlock the item and create it from the text item within.

In the case of a discontinuous report, we have different items on columns (Product line and Order method type). However, when you select the text item from intersection, Report Studio doesn't distinguish between them.

Hence, we need to select the intersection under one of the column items and set its Define content to Yes. This means we want to override the contents of this intersection and define the contents ourselves.

After changing the property, Report Studio makes that intersection empty. We can then unlock the items and drag any measure/calculation into it. We chose to drag Quantity again. Now Report Studio will distinguish between both the Quantity items (the one under Product line and the one under Order method types).

Finally, we defined drill-through to Drill-3 appropriately.

There's more...

You can also use the Define content option to override the information being displayed. For example, if you want to show Revenue under Product lines instead of showing Quantity.

This also gives you the opportunity to define styles differently and use conditional styling.

主站蜘蛛池模板: 肇州县| 霍山县| 黎平县| 稻城县| 宁津县| 乐都县| 新沂市| 彭山县| 墨玉县| 饶河县| 都兰县| 汾西县| 泗洪县| 余姚市| 东乌珠穆沁旗| 阿拉善左旗| 深圳市| 吴忠市| 孝义市| 永泰县| 苍梧县| 泽普县| 麦盖提县| 武穴市| 镇康县| 汽车| 德庆县| 宜阳县| 卓资县| 新昌县| 商洛市| 遵义市| 大渡口区| 财经| 威信县| 贵州省| 桃源县| 宁远县| 合山市| 秭归县| 三亚市|