Adding a tool tip

So far, we got what we want in this report. We have a chart that shows the proportion between In-Store and Online sales. The bars show the comparative percentage between the two purchase methods, visually.

But we still want to get some numbers on the chart, such as the number of products sold and their dollar value, without cluttering the chart. We can achieve this with the use of the tool tip.

Right-click on the chart series and select Series Properties as shown in the following screenshot:

Adding a tool tip

On the Series Properties dialog box, click on the expression button next to the drop-down textbox of the tool tip and enter the following expression:

=CStr("Sold Items: " + FormatNumber(Count(Fields!Category.Value),0) + "  Value: " + (FormatCurrency(Sum(Fields!LineTotal.Value),2)))

The CStr function converts the argument to string. We cannot concatenate a string and an integer. So, we need that CStr function to convert the category count returned by the Count function into string.

Presto! We've added another layer of data without actually adding any clutter to the chart itself. Now, if we hover our mouse over any of the series or bar, a tool tip shows the number of items sold, and the dollar value for that category:

Adding a tool tip
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.165.62