Diferencia entre revisiones de «TpAUX CLASE SUBTOTAL unit»
Ir a la navegación
Ir a la búsqueda
Sin resumen de edición |
|||
| (No se muestran 2 ediciones intermedias del mismo usuario) | |||
| Línea 4: | Línea 4: | ||
=[[QUEESESTO/IDENTIDAD|Identidad]]= | =[[QUEESESTO/IDENTIDAD|Identidad]]= | ||
[[Category:MANUAL/PROGRAMADOR]] | [[Category:MANUAL/PROGRAMADOR]] | ||
[[Category:AUXILIARES]] | [[Category:PRG AUXILIARES]] | ||
*Ancestro: [[TComponent]] | *Ancestro: [[TComponent]] | ||
*Carpeta: C:\DevelopPrx\pPRAGMA | *Carpeta: C:\DevelopPrx\pPRAGMA | ||
| Línea 64: | Línea 64: | ||
=Modo de uso= | =Modo de uso= | ||
El auxiliar se usa de la siguiente manera (ejemplo tomado de [[TprxADODataSetMaster]].ChildHasPosted): | |||
<pre> | <pre> | ||
procedure TprxADODataSetMaster.ChildHasPosted(aChildDS: TprxADODataSetMaster); | |||
prxADOClientDM. | begin | ||
prxADOClientDM.pAUX_CLASE_SUBTOTAL_unit.Execute(Self); | |||
end; | |||
</pre> | </pre> | ||
Cuando el evento '''ChildHasPosted''' se ejecuta (cada vez que un detail postea un registro) directamente se llama a la función '''Execute''' del auxiliar para subtotalizar lo que corresponda. | |||
</pre> | </pre> | ||
=Usos= | =Usos= | ||
Este auxiliar lo usa: | Este auxiliar lo usa: | ||
*[[TprxADODataSetMaster]].ChildHasPosted). | |||
Revisión actual - 16:38 22 may 2025
Descripción
El objeto TpAUX_CLASE_SUBTOTAL_unit (Subtotales desde detalles en edición de clases) procesa los auxiliares de tipo SUBTOTAL, ver detalles en DEV AUXILIARES/SUBTOTAL.
Identidad
- Ancestro: TComponent
- Carpeta: C:\DevelopPrx\pPRAGMA
- Archivo: pAUX_CLASE_SUBTOTAL_unit.pas
Declaración
type
TpAUX_CLASE_SUBTOTAL_item = record
Dataset: TprxADODataSet;
Parser: Tfva_parser_fbn;
Campo: String;
Calculo: String;
Regla: String;
ModoSubtotal: String;
UsaMaster: Boolean;
Valor: Variant;
end;
type
TpAUX_CLASE_SUBTOTAL_unit = class(TComponent)
private
FQuery: TprxADOQuery;
FSQL_CALCULO: TStringList;
FSQL_REGLA: TStringList;
FTag_MODOSUBTOTAL: String;
FTag_USAMASTERDS: Boolean;
FItems: TStringList;
protected
Reglas: array[0..13] of TpAUX_CLASE_SUBTOTAL_item;
ReglasCount: Integer;
property SQL_CALCULO: TStringList read FSQL_CALCULO write FSQL_CALCULO;
property SQL_REGLA: TStringList read FSQL_REGLA write FSQL_REGLA;
property Tag_MODOSUBTOTAL: String read FTag_MODOSUBTOTAL write FTag_MODOSUBTOTAL;
property Tag_USAMASTERDS: Boolean read FTag_USAMASTERDS write FTag_USAMASTERDS;
function ExecuteDataset(aDataSet: TprxADODataSetEdit; aTableName: String): Boolean;
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
function Execute(aMasterDS: TprxADODataSet): Boolean;
property Query: TprxADOQuery read FQuery write FQuery;
property Items: TStringList read FItems;
published
end;
Implementación
function ExecuteDataset(aDataSet: TprxADODataSetEdit; aTableName: String): Boolean
Este Execute lo llama cada clase detalle de la clase de la función Execute. Retorna True si define subtotales.
function Execute(aMasterDS: TprxADODataSet): Boolean
Similar anterior pero llamado por un master.
Modo de uso
El auxiliar se usa de la siguiente manera (ejemplo tomado de TprxADODataSetMaster.ChildHasPosted):
procedure TprxADODataSetMaster.ChildHasPosted(aChildDS: TprxADODataSetMaster); begin prxADOClientDM.pAUX_CLASE_SUBTOTAL_unit.Execute(Self); end;
Cuando el evento ChildHasPosted se ejecuta (cada vez que un detail postea un registro) directamente se llama a la función Execute del auxiliar para subtotalizar lo que corresponda.
Usos
Este auxiliar lo usa:
- TprxADODataSetMaster.ChildHasPosted).