Reference¶
A flat list of the symbols introduced or used by the drilldown feature. Use this as a quick lookup when reading the source.
New methods on COrdersCausingShortages¶
OnDrillDown¶
Override of CBoxModule.OnDrillDown. Invoked by the framework when the user double-clicks a row on the main report. Builds drilldown criteria, ensures a default layout is configured if none is saved, opens the drilldown form, and wires up the cell color-coding handler.
ApplyDefaultDrilldownLayout¶
Private Sub ApplyDefaultDrilldownLayout(ByVal layoutInterface As PulseDevTools.DynamicQuery.CLayoutInterface)
Configures the drilldown's layout when the user has no saved layout for it. Adds item_no as a grouping column and the seventeen standard MRP detail columns as visible columns.
AddLayoutElement¶
Private Sub AddLayoutElement(ByVal layoutInterface As PulseDevTools.DynamicQuery.CLayoutInterface,
ByVal fieldName As String,
ByVal visibleIndex As Integer,
ByVal groupIndex As Integer)
Helper used by ApplyDefaultDrilldownLayout. Resolves a matrix field name to its element ID, then either updates an existing CElementLayout entry for that ID or appends a new one. Sets m_nVisibleIndex, m_nGroupIndex, and (for grouped columns) m_nSortOrder = 1.
Silently no-ops if the field name does not resolve to a matrix element.
gvMRPDetails_CustomDrawCell¶
Private Sub gvMRPDetails_CustomDrawCell(ByVal sender As Object, ByVal e As DevExpress.XtraGrid.Views.Base.RowCellCustomDrawEventArgs)
CustomDrawCell event handler for the drilldown's gridview. Applies the coloring rules described on the Color coding page.
DataSaveBegin / DataLoadEnd¶
Private Sub DataSaveBegin(ByVal sender As Object) Handles Settings.DataSave
Private Sub DataLoadEnd(ByVal sender As Object) Handles Settings.DataLoad
Persist the drilldown's layout (m_DetailsQueryView.MyData) into the module's serialized state (MyData.m_DetailsLayout).
Module fields and references¶
| Symbol | Purpose |
|---|---|
m_DetailsQueryView |
The PulseDevTools.DynamicQuery.CQueryView for the drilldown. Bound to the MRP_Details optimized table. |
m_DetailsQueryView.Settings.ShareID |
Set to ModuleInfo.ModuleID & "_DetailsDrilldown" so saved layouts are scoped to this module. |
m_DetailsQueryView.MyData.m_MandatoryElementIDs |
List of matrix element IDs that must always be cached on the details query (safety_stk, mrp_ord_type, mrp_new_qty_il). |
MyData.m_DetailsLayout |
Where the saved drilldown layout lives in the module's serialized state. |
MyData.ItemLocationMinimumQuantityMode |
Property on COrdersCausingShortages.CSD_1 controlling the "minimum quantity" threshold used by the color-coding handler. |
External APIs used¶
Calendar¶
| API | Purpose |
|---|---|
Pulse.Calendar.GetWeek(date, firstDayOfWeek) |
Returns the seven-day PeriodRange containing the given date. |
Pulse.Calendar.ProductionWeekStart |
The configured first day of the production week (a Microsoft.VisualBasic.FirstDayOfWeek value). |
Layout / criteria model¶
| API | Purpose |
|---|---|
PrimaryLayoutInterface.Criteria.AddCriteriaByFieldName(name, op, value) |
Adds a single criterion to the drilldown's WHERE clause. |
PrimaryLayoutInterface.GetVisibleOrGroupedCount() |
Returns the number of layout elements with m_nVisibleIndex >= 0 or m_nGroupIndex >= 0. Used to detect "empty" saved layouts. |
PrimaryLayoutInterface.Layout |
The mutable CLayoutSet. The m_LayoutElements list is the source of truth for visibility, grouping, sort, and width. |
PrimaryLayoutInterface.Layout.GetElementCoreByFieldName(name) |
Resolves a field name to its matrix element. |
PrimaryLayoutInterface.Layout.GetDrillDownForm() |
Returns the cached FDrilldown instance for this layout. |
PrimaryLayoutInterface.GridView |
The DevExpress gridview bound to this layout (after DisplayDrillDown). |
Connection¶
| API | Purpose |
|---|---|
AppCon.FillDataTable(query, table) |
Runs a SELECT and fills a DataTable. Used here once per drilldown to gather the BOM-related items list. |
Operators used on enumLogicalOperator¶
The drilldown uses these operators from DynamicQuery.CCriteria.CSD_1.enumLogicalOperator:
| Operator | Used for |
|---|---|
IsIn |
item_no filter against the list of related items |
EqualTo |
item_loc filter (when applicable) |
GreaterOrEqualTo |
Lower bound of the mrp_trx_dt week range |
LessOrEqualTo |
Upper bound of the mrp_trx_dt week range |
Warning
The greater/less operators are spelled GreaterOrEqualTo and LessOrEqualTo — not GreaterThanOrEqualTo / LessThanOrEqualTo.
Matrix elements involved¶
These are the matrix elements the drilldown reads, filters on, or shows. All existed before this feature; none were added.
| Field name | ID | Caption |
|---|---|---|
| item_no | 11 | Item # |
| item_loc | 486 | Loc |
| item_desc_1 | 323 | Item Desc 1 |
| imloc_byr_plnr | 298 | Byr Plnr |
| pur_or_mfg | 570 | Item Pur or MFG |
| mrp_ord_type | 797 | MRP - Ord Type |
| mrp_trx_dt | 799 | MRP - Demand/Replenish Date |
| qty_on_hand_il | 580 | O/H Qty (Loc) |
| mrp_trx_qty | 800 | MRP - Qty Demand/Replenish |
| mrp_new_qty_il | 801 | MRP - New Qty On-Hand (Loc) |
| mrp_ord_no | 798 | MRP Ord # |
| safety_stk | 604 | Safety Stk |
| po_lead_tm | 544 | PO Lead Tm |
| cus_no | 4 | Cust # |
| oe_ord_no | 12 | OE Ord # |
| par_item_no | 1155 | Par Item # |
| org_ord_no | 850 | Org Ord # |
| po_ord_no | 490 | PO Ord # |
SQL temp tables referenced¶
| Table | When it must exist |
|---|---|
#FlatBOM |
At the moment the drilldown opens. The query against it has columns comp_item_no, fg_item_no, par_item_no. The drilldown falls back to filtering by the drilled item alone if the lookup fails. |