Gantt Chart
Gantt charts are an excellent way to track projects in Visual KPI. They are a type of bar chart that can show project schedules, dependencies, and status. You can configure Gantt charts using Visual KPI Designer.
Using a Gantt chart, you can display all the project's elements along a timeline, indicating when each element is scheduled for completion, any dependencies, and each task's status. The Gantt chart's vertical axis lists the tasks or project elements, while the horizontal axis displays time intervals. Gantt charts are particularly useful in Visual KPI because they can vividly display the status of tasks or project elements.
Define Gantt Chart Attributes
After creating and configuring some basic attributes for a chart, you can design how the Gantt chart looks. Below are the basic attributes you need to set to design a simple Gantt chart. For a comprehensive list of attributes you can configure, see the Gantt Charts Attributes & Keywords Reference Guide.
- ConnectString
- Query
- Description
- Group Name
- Info Display Format
- Display Order
KPIs without an assigned Display Order are displayed alphabetically, following the KPIs with an assigned Display Order.
Connecting to SQL Databases
You might need to connect to an SQL database to use Gantt charts effectively. Here's how you can use Connect Strings with the interfaces in Visual KPI:
Connect Strings Format
The format for connecting strings varies depending on the target database. You can define the connect string in the interface configuration or use a Windows Datasource Name (DSN) and reference that DSN in the interface's configuration.
Example Connect Strings
-
SQL Server:
Driver={SQL Native Client};Server=.\Demo;Database=SQLDEMO;Trusted_Connection=yes;
Driver={SQL Native Client};Server=.\SQLEXPRESS;Database=SQLDEMO;Trusted_Connection=no;UID=<userid>;PWD=<password>;
DSN=DSNACCESS;
-
MS Access:
Driver={Microsoft Access Driver (*.mdb)};Dbq=C:\Data\Projects\VKPI ODBCWS\db2.mdb;
If your database is in SQL Server 2005 Express, the Server portion of the connect string must include the instance name following the period. For example: Server=.\SQLExpress
.
Connecting to SQL Databases
To connect to relational databases, make sure that the following prerequisites are met:
- ODBC drivers installed on the Visual KPI Server.
- Database client tools installed on the Visual KPI Server.
- Technical resources available to test the connection from the Visual KPI Server to the database using client tools and able to query the database.
Refer to the Prerequisites and Downloads for links to vendor drivers and other required software.
Parameterizing SQL Interfaces
A parameterized query or prepared statement is a pre-compiled query in which placeholders or variables are used for parameters. The parameter values are supplied at execution time, which helps avoid SQL injection attacks by separating user input from the command structure.
Advantages of Parameterized SQL
- Fewer string concatenations.
- No need for manual string escaping.
- More generic query forms presented to the database.
- Smaller request strings, as parsing and optimizing are done once per query type.
- Encourages execution plan reuse for complex queries.
Using Stored Procedures
A stored procedure is reusable SQL code. You can write and save the SQL query you want to reuse many times, then call the stored procedure to run the SQL code. Stored procedures can also accept parameters for more specific queries, offering protection against SQL injection attacks.