Create charts (number of charts in the report) dinamically based on parameter selection
Hi guys, I have the following task: Implementing a report that create dinamically as many charts/tables as the parameters selected. This means that the number of tables/charts are variables (depending the numebr of parameters selected) and I do not in advance. Please, do you have any suggestions how to implement it? Observation: I can create a chart with series, but the problem is that the values for each series is very different (e.g.: serie A: values from 5 to 100, series B values from 10000 to 20000, therefore it should be difficult read the chart) Thanks
June 23rd, 2011 10:52am

Hi Fasttrack, I am afraid, you cannot dynamically create charts in SSRS. As a workaround, you can create charts with the range of Series that you expect and show/hide them accordingly. Not a best solution though :-)MSBI Developer
Free Windows Admin Tool Kit Click here and download it now
June 23rd, 2011 11:22am

Hi fasttrack, Whether this issue come true is dependent on your specific requirement, what's the relationship between your parameters and dataset, are these chart and table's dataset from one dataset? hope you can give a detail explanation about your scenario, you can also give some report layout sample to demonstrate your requirement. To your second question, there is a property of Enable scale breaks , you can select it to avoid this situation. Then column's height of chart will seem concordant. Steps are: 1. Right-click the vertical label on Y-Axis and then select Vertical Axis Properties. 2. Then you will see the checkbox of Enable scale breaks in Scale Option, please select it. If you have any question, please feel free to ask. Thanks, Challen Fu
June 23rd, 2011 11:11pm

Hello guys to support me in this scanario. Obs: SSRS 2005 I would like to explain: a table (this is an example): containing the speed of some Cars, recorded at certain time (datetime), the following dataset result will be represented in the chart (each chart show the speed for each car). values datetime car 10 1 A 5 2 A 12 3 A 8 1 B 20 2 B 7 3 B The numbers of cars may be variables, it means the dataset (depending on the query result) may be represented by only the CAR B, or CARS A, B, C, B or Cars: B, Z and so on (I mean: I do not in advance which cars will be in the dataset) The paramter shows the list of the CARs available in the resulting dataset (in this case only A and B). Therefore: If I select (from the parameter) only CAR A, I will have only the chart for the car A, If I select Car B, I will have only the chart for the car B, If I select Cars A and B, I will have 2 charts : chart for car A and Chart for Car B. In general: If I select (from the parameter) only CAR A, I will have only the chart for the car A, If I select Cars B, G, W, I will have 3 different charts for each car selected (B, G and W). This means that: If I select only 1 car, I will have only 1 charts, If I select 5 cars, I will have 5 charts, and so on. Currently, to satisfy this requirement, I thought to adopt this solution (but I would like to do something else): Adding another column and for each row with the same car assigning a number, eg: values datetime car N 10 1 A 1 5 2 A 1 12 3 A 1 8 1 B 2 20 2 B 2 7 3 B 2 Then , to create 20 charts, with visibility depending on the number, eg: the first chart is visible if 1 exists, second chart is visible if 2 exists and so on. Then apply a filter on each chart: the first chart show only data where N=1, the second chart show only data where N=2, and so on. This not the best, but currently is the only solution. If you find a dynamic scenario to accomplish my requirement, I appreciate it a lot. Many thanks
Free Windows Admin Tool Kit Click here and download it now
June 25th, 2011 7:10pm

Hello guys to support me in this scanario. Obs: SSRS 2005 I would like to explain: a table (this is an example): containing the speed of some Cars, recorded at certain time (datetime), the following dataset result will be represented in the chart (each chart show the speed for each car). values datetime car 10 1 A 5 2 A 12 3 A 8 1 B 20 2 B 7 3 B The numbers of cars may be variables, it means the dataset (depending on the query result) may be represented by only the CAR B, or CARS A, B, C, B or Cars: B, Z and so on (I mean: I do not in advance which cars will be in the dataset) The paramter shows the list of the CARs available in the resulting dataset (in this case only A and B). Therefore: If I select (from the parameter) only CAR A, I will have only the chart for the car A, If I select Car B, I will have only the chart for the car B, If I select Cars A and B, I will have 2 charts : chart for car A and Chart for Car B. In general: If I select (from the parameter) only CAR A, I will have only the chart for the car A, If I select Cars B, G, I and W will have 4 different charts: B, G , I and W. If I select N Cars from the parameter selection, I will have N charts. This means that: If I select only 1 car, I will have only 1 charts, If I select 5 cars, I will have 5 charts, and so on. Currently, to satisfy this requirement, I thought to adopt the following solution (but I would like to do something else if possible): Adding another column and for each row with the same car assigning a number, eg: values datetime car N 10 1 A 1 5 2 A 1 12 3 A 1 8 1 B 2 20 2 B 2 7 3 B 2 Then , to create 20 charts, with visibility depending on the number, eg: the first chart is visible if 1 exists, second chart is visible if 2 exists and so on. Then apply a filter on each chart: the first chart show only data where N=1, the second chart show only data where N=2, and so on. This not the best, but currently is the only solution. If you find a dynamic solution to accomplish my requirement, I appreciate it a lot. Many thanks
June 26th, 2011 2:09am

Hi fasttrack, Based on your explanation, I think this requirement can be easily achieved in reporting services, just drag a list control into your report body, then add a group(Car) to this list--this is the most important step, then lay your original chart into this list, you will get the chart dynamically. Make sure your dataset only return the records based on the parameter's value you selected. If you have any question about this requirement, please feel free to ask. Thanks, challen FuPlease remember to mark the replies as answers if they help and unmark them if they provide no help.
Free Windows Admin Tool Kit Click here and download it now
June 29th, 2011 6:05am

Hi Challen, but I think my requiremnt is different: I nned to show as many charts as the 'cars' are selected from the parameter list. Based on your explanation it looks like that there is only 1 chart. Please let me know Many thanks
June 29th, 2011 6:50am

Hi fasttrack, Have you tried the steps in my second reply? it should work for you, please make sure to add a group to list, the group's expression is just your car field, please also make sure your dataset is just returning the cars selected from the parameter list just like you mentioned, you can add a filter to dataset, you can also contain the parameter in T-SQL.Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Free Windows Admin Tool Kit Click here and download it now
June 30th, 2011 5:56am

Hi Fasttrack, What's the process following my reply?Please remember to mark the replies as answers if they help and unmark them if they provide no help.
July 3rd, 2011 10:59pm

Hello Challen thanks for your help. Currently I have been working on other tasks and I am going to go back to the problem arose shortly. As soon as I will start dealing with it I check your suggestion trying to implement it. Please, I am interested also in your advise about Enable scale breaks (SSRS 2005): I do not see it. Please where is it? Thanks
Free Windows Admin Tool Kit Click here and download it now
July 13th, 2011 4:46am

This feature is only available to SSRS 2008 or later version.Please remember to mark the replies as answers if they help and unmark them if they provide no help.
July 16th, 2011 9:55pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics