ActiveReports 18 .NET Edition
Report Authors / Design Reports / Design Page/RDLX Reports / Tutorials: Report Controls in Page/RDLX Reports / Bullet Control to Visualize Sales against Target
In This Topic
    Bullet Control to Visualize Sales against Target
    In This Topic

    Let us create a report that shows the sales relative to a target sale amount for each customer. We will use the Bullet control inside a Table data region to create this report. The report connects to the 'Sale' table from the 'Reels.db' data source available on GitHub.

    Sales Report sample with Bullet control

    Create a Report

    In the ActiveReports Designer, create a new Page or an RDLX report.

    If you are creating a new report in the Visual Studio Integrated Designer, see Quick Start.

    Bind Report to Data

    As you create a new report, you can configure the report data connection in the Report Wizard. You can also access the Report Data Source dialog by right-clicking the Data Sources node in the Report Explorer and then selecting the Add Data Source option. See SQLite for details.

    1. On the Choose Data Source Type screen of the wizard, select SQLite and click Next.
    2. To specify the DataBase Path, click the Browse button and navigate to the desired file on your system. For example, you can connect to the Reels.db sample data source which can be downloaded from GitHub.
    3. Click Test Connection to test the connection.
    4. Then click the Next option and configure the dataset by adding a valid query.
    5. Enter an SQL query like the following into the Query text box:
      Dataset Query
      Copy Code
      SELECT * FROM Sale ORDER BY Customer ASC
      

      See Query Builder in Microsoft SQL Client and OLEDB Providers for more information on building SQL queries.
    6. Click Next to proceed to the final screen of the Report Wizard.
    7. On the final screen of the Report Wizard, review the summary of the report and click Finish to successfully add the report with the SQLite data source.

    Design Report Layout

    1. Drag and drop the Table data region onto the design area of the Report Designer.
    2. Drag a Bullet control onto the Details row of the table and in the Properties panel, set its Value property to 
      =Fields!SalesAmount.Value
      This Value property is used to define the key measure displayed on the graph.
      Setting the Value property for Bullet control
    3. With the Bullet control selected on the design area:
      • Set its Target Value property to 200. This property defines a target for the Value to be compared to.
        Setting the Target property for Bullet control
      • Set its Best Value property to 400 and the Worst Value property to 0. The Best Value and Worst Value properties define the value range on the graph.
        Setting the Best Value and Worst Value properties for Bullet control
      • You can also optionally encode the segments on the graph as qualitative ranges indicating bad, satisfactory, and good sections.
        • The Range1Boundary property defines a value for the bad/satisfactory boundary on the graph. Set this property to 150.
        • The Range2Boundary property defines a value for the satisfactory/good boundary on the graph. Set this property to 300.
          Setting the RangeBoundary properties for Bullet control
      • You can also optionally define the Interval property for the graph value range. So, set this property to 100.
    4. Specify the TargetShape as 'Line'.
    5. Specify the position of TickMarks as 'Inside'.
    6. Modify the appearance of the report. You can customize the appearance of bullets as follows:
      1. Set the TargetStyle and the TickStyle properties.
      2. Specify color patterns based on the relative value of the key measure. For example, set the expression like the following in the ValueColor property to show the color pattern based on the value of [SalesAmount]:
        Expression for ValueColor Property 
        Copy Code
        =iif(Fields!SalesAmount.Value >= 200, "#BFECB8", "#FFB1AE")
        
    See Also