Complete Example
What This Code Does
- Imports CSV data - Loads a CSV file into memory using
TBICSV.FromFile - Creates a query - Parses a SQL-like query string to sum stock by category and color
- Executes the query - Runs
Calculateto generate aggregated results - Visualizes results - Displays data in both a grid and chart automatically
Expected Output
The grid will show:- Category column (e.g., Electronics, Clothing)
- Color column (e.g., Red, Blue)
- Sum(Stock) column with aggregated values
Key Concepts
- TDataItem - Core class representing a table or dataset
- BIQuery - Component for creating and executing queries
- BIGrid/BIChart - Visual components that bind to TDataItem
- Memory management - Always free TDataItem objects in FormDestroy
Interactive Editors
TeeBI includes visual editors for runtime customization:See Also
- Importing Data - Learn about all import formats
- Simple Queries - More query examples
- Charts - Advanced chart customization
- Grids - Grid features and options
