Tuesday, March 20, 2012

Number of charts vary with respect to a parameter

Hi

I have a situation similar to this example - The X Axis represents the Date and the Y Axis represents the number of vehicles sold and the data i need to represent is the type of each vehicle(Line Graph). Hence there should be one graph for each Vehicle type. Is it possible to generate as many Chart Objects in the rdl file dynamically.

I tried representing all the lines in a single chart but the since the sales value is varied as an example for a particular vehicle type it shall vary from 10000 to 1000000 and for another it varies from 10 to 100. So one vehicle type gets represented clearly and the other looks like a straight line.

Please help with the solution.

Thanks

Saishyam

> Hence there should be one graph for each Vehicle type.

Ok, let's assume you have a VehicleType field. Steps:
1. Add a list to the report
2. Add a list grouping based on the expression: =Fields!VehicleType.Value
This will create one list instance per vehicle type.
3. Add a chart into the list (make sure the chart is really contained within the list instead of overlaying)
4. Design your chart

You should then get one chart per vehicle type at runtime.

-- Robert

|||

Hi Robert

Thanks for the reply, I feel it will definitely help me out. Also will the layout be automatically taken care or should i code for that also.

|||

Not sure what you mean exactly with "layout", but if you leave the y-axis maximum value blank, the individual charts will automatically scale the y-axis based on the actual data values.

-- Robert

No comments:

Post a Comment