File Name: TeraCalculation_EIQ.vb
Line Count: ~2,479 lines
Class Name: teraCalculation4_ReferenceEIQForm
Base Inheritance: Form (Windows Forms)
Interface: IDisposable (Explicit memory disposal)
Module Function: Implements core EIQ Analysis (Entry-Item-Quantity) analytics and visualization.
Manages tab switching and initialization across 7 analytics views.
Handles reading and updating analytical configuration parameters.
Executes DataGridView formatting, cell alignment, and grid sizing.
Imports raw Excel files and builds core Access database tables.
Renders time-series trend line charts.
Renders Entry × Item scatter plot distributions and rank classifications.
Displays detailed summary grids.
Displays customer destination × SKU cross-tabulation heatmaps.
Executes multi-query data filtering and recalculation.
| Method Name | Role Description | Execution Flow |
|---|---|---|
teraCalculationEIQ_Load |
Form Load Initialization |
• Verifies data folder paths • Renders total summary grids • Loads scatter plot rank data • Applies recommended EIQ presets |
| Method Name | Tab Index | Execution Action |
|---|---|---|
EIQTc_SelectedIndexChanged |
Case 0 | EIQ Data Creation Tab - Checks table generation status |
| Case 1 | EIQ Trend Curves Tab - Renders trend charts | |
| Case 2 | EIQ Scatter Plot Tab - Displays initial scatter plot | |
| Case 3 | EIQ Table Tab - Configures summary grids | |
| Case 4 | EIQ Matrix Tab - Renders cross-tabulation matrix | |
| Case 5 | Custom Filter Tab - Resets filter parameters | |
| Case 6 | Tote Conversion Tab - Calculates container equivalents |
| Method Name | Type | Description |
|---|---|---|
UpdateMyData() |
Sub | Saves analytical parameters into table My_DATA1- Database and Excel file paths - Rank thresholds (A1/A2/B/C/D) - Case vs Piece targets - Target date parameters |
LoadMyData() |
Sub | Reads settings from My_DATA1 into global variables |
| Table Name | Description | Data Source |
|---|---|---|
T000_ShippingData |
Raw transaction log table | ShippingData.xlsx / Sheet1 |
My_DATA1 |
System configuration table | User settings |
| Table Name | Description | Content |
|---|---|---|
T130_TotalShippingSummary |
Master summary table | Cumulative dataset totals |
T230_DailySummary |
Daily summary table | Aggregations grouped by date |
T610_EIQTableCaseShipping |
Case EIQ matrix table | Entry × Item case matrix |
T620_EIQTablePieceShipping |
Piece EIQ matrix table | Entry × Item piece matrix |
T670_EIQScatterPlotRankData |
Scatter plot rank table | A1/A2/B/C/D rank classifications |
Public Class teraCalculation4_ReferenceEIQForm Implements IDisposableGC.Collect() and GC.WaitForPendingFinalizers() to purge memory after rendering large DataGridViews.Provider=Microsoft.ACE.OLEDB.12.0;Data Source={MyDB}| Error Exception | Root Cause | Engineering Mitigation |
|---|---|---|
| FillWeight 65535 Overflow | Excessive DataGridView columns | Fix FillWeight=10 on dynamic columns |
| Rank Total Error | Rank sum does not equal 100% | Validate rank totals equal 100% prior to execution |
| Database Lock Error | Access file locked by another process | Close Access before running imports |