Can I force a Chart at the top of a report to always be visible

前端 未结 1 416
梦毁少年i
梦毁少年i 2021-01-20 04:46

I have the following report:

\"enter

In Excel I\'d use something

相关标签:
1条回答
  • 2021-01-20 05:52

    Yes, you can get this going with a bit of tweaking.

    With Tablix objects, you have the option to fix header rows, i.e. they will stay at the top of the page when scrolling.

    You can set this at the Tablix level:

    enter image description here

    Or at the row level with Advanced Mode set by using the FixedData property:

    enter image description here enter image description here

    So what you can do to take advantage of this is to insert a Chart into those repeating Header rows. I tested this with a basic report:

    enter image description here

    This did succeed in having the Chart scroll with the Tablix, so will fulfil your requirements. One warning - it didn't look good when I did this (overlapping cells and the like), but it was a report with zero formatting so hopefully this will be helpful for you, anyway.

    Edit after comment:

    In my simple report example I added a new Dataset to the report, and pointed the embedded Chart to this new Dataset - this didn't work, as every time I did this it would always revert to the old Dataset (i.e. the one specified at the Tablix level).

    However, what you can do instead is use a Subreport, which contains the required Chart, and embed this Subreport in the Tablix header. I just tried it now and it worked as required; the Chart using the second Dataset was fine and it scrolled with the Tablix as required.

    So it's still a viable option with multiple Datasets, you just need the extra step of using a Subreport:

    New report:

    enter image description here

    Subreport:

    enter image description here

    0 讨论(0)
提交回复
热议问题