Dynamic control of number of charts in SSRS reports

Brett Robbins 1 Reputation point
2021-08-24T20:57:55.543+00:00

I have a created a dynamic chart in SSRS. It creates a chart for each of the machines I am tracking in an area. If I have 3 machines I have 3 charts in a row accross the page. If I have 9 machinies I have 9 charts in a row accross the page. Is there away force SSRS to start a new row after 3 or say 4 charts? I found one suggestion with a custom function in the report code but if I have 9 machines I get a report like so:

4 charts then 5 "No Data" charts on the first row
4 "No Data" charts then 3 charts followed by 2 "No Data" charts on the second row
7 "No data" charts then 2 charts.

In tablix I have a ColumnGroup on my machine name and in the Row Details a Group by the value returned from the function. In my function I was trying to count the machines and return a 1 for machines 1 thru 3, 2 for 4 thru 6 , etc...

126192-image.png

SQL Server Reporting Services
SQL Server Reporting Services
A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.
2,916 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Joyzhao-MSFT 15,576 Reputation points
    2021-08-25T06:21:34.967+00:00

    Hi @Brett Robbins

    I am sorry that I am not clear about your needs. Do you want to use custom code to set the number of dynamically displayed charts per row? You could refer to this article: https://www.bi4all.pt/en/news/en-blog/dynamic-control-of-number-of-charts-in-ssrs-reports/
    If I misunderstand what you mean, please feel free to let me know.
    Best Regards,
    Joy


    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.