Chart Data (Value)


Chart requires at least one set of data values associated with it. You can simply drag and drop a field to the Drop Data Fields Here area of a chart. The data determines the size of a chart element for each type of chart. For example, for a column chart, the data determines the height of a column on a chart.

Data is considered static. For a Column chart, it means that a single data file added to a chart (and no series) results in a single column providing a sum of all values and a single legend. If you add one more data field to a chart, SSRS shows a second column and adds a second legend.

Most charts group data by a series or a category. In this case, you must use an aggregate expression for a data value. This is similar to grouping in a table or matrix where non-aggregate expressions are syntactically allowed. However, the result contains the last value of a field instead of a summary value for a group and, thus, produces an unexpected result. Report Designer automatically adds an aggregate function, but changes are allowed. To verify or change the data value expression, you can either edit the RDL or access this expression from the Data tab of the Chart Properties dialog box. Following is the RDL that describes the data value. From this point forward in this book, the section surrounded by the <ChartData> tag is abbreviated as {CHART DATA} .

 <ChartData>    <ChartSeries>      <DataPoints>       <DataPoint>         <DataValues>           <DataValue>             <Value>=Sum(Fields!LineTotal.Value)</Value>           </DataValue>         </DataValues>        <DataLabel />        <Marker />     </DataPoint>    </DataPoints>   </ChartSeries> </ChartData> 



Microsoft SQL Server 2005 Reporting Services
Microsoft SQL Server 2005 Reporting Services
ISBN: 0672327996
EAN: 2147483647
Year: 2004
Pages: 254

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net