Skip to content

Exercise 2: Visualization

This exercise is to be completed individually for 5 points.

The table report shows all sales. That is not useful to get a quick overview. A diagram would be more helpful. Create a diagram that displays the sales per category.

Inserting a diagram

  1. Switch to Design tab and drag a Chart from the Toolbox to the canvas to the table's right side. You might have to wait a while for the diagram wizard to open. Choose a column diagram.

  2. Drag LineTotal from the Report Data pane to the diagram. Do not release the left mouse button. A window will appear beside the diagram. The window is titled Chart Data. Go to the "∑values" field with your mouse. Release the left mouse button now.

    Adding a chart

    This makes the totals be displayed on the vertical axis.

  3. Next, drag Subcat field into Category Groups and Date into Series Groups.

    Diagram configuration

    The horizontal axis displays the categories, and we get separate columns per date series.

  4. Right, click label [Date] and select Series Groups Properties. Click on the fx button in Group Expressions.

    Set Expression

    The following expression: =Year(Fields!Date.Value)

    Expression value

    This will produce a yearly breakdown per category.

  5. Press OK in both windows. Before checking the Preview, increase the height of the chart; otherwise, the labels at the bottom will remain hidden:

    Resize diagram

  6. Check the preview now: it shows the sales per category for each year separately.

    Diagram preview

Format the diagram

There are a few changes to make.

  1. Click Chart title and replace the title: "Revenue by category NEPTUN" with your own Neptun code.

  2. Right-click <<Expr>> in Series Groups and choose Series Groups Properties. Click on the fx button next to Label. Type: =Year(Fields!Date.Value). Now the label will be the year part of the date.

  3. Right-click the vertical axis and select Vertical Axis Properties.

    Axis properties

    Select Currency from the Number group and fill out as previously:

    Axis formatting

  4. Check the preview now: the diagram will look much better (and also has your Neptun code):

    Preview

SUBMISSION

Create a screenshot of the report preview page. Save the screenshot as f2.png and submit it with the other files of the solution. The screenshot shall include Visual Studio and the report preview. Verify that your Neptun code is visible in the diagram title!

Upload the changed Visual Studio project and its corresponding files too.

Back to top