« GetCounter (QueryExporter) » : différence entre les versions
(Page créée avec « {{version11}} <source lang='delphi'>function GetCounter(const iName:string):Integer;</source> Cette méthode retourne la valeur d'un compteur. {|class="wikitable" |- !P... ») |
Aucun résumé des modifications |
||
Ligne 17 : | Ligne 17 : | ||
|} | |} | ||
Exemple : | |||
'''Utilisation des compteurs:''' | |||
<source lang="delphi"> | <source lang="delphi"> | ||
//procedure TVueExport.RegleDerivation_EcritureNum; | |||
begin | |||
Result := 'Counter(P,'+PieceRef+')'; | |||
end; | |||
procedure TExportVue.doExport; | |||
begin | |||
inst := TQueryExporter.Create; | |||
... | |||
inst.SetCounter('P',0); | |||
... | |||
ctn := inst.GetCounter('P'); | |||
inst.Export(TVueExport.CreateSelector(....)); | |||
ctn := inst.GetCounter('P') - ctn; | |||
... | |||
end; | |||
</source> | </source> | ||
<pre> | |||
Vue : | |||
DatePiece PieceRef EcritureNum | |||
01-01-2023 1230 1 | |||
01-01-2023 1230 1 | |||
01-01-2023 1230 1 | |||
01-02-2023 1232 2 | |||
01-02-2023 1232 2 | |||
01-02-2023 1232 2 | |||
01-03-2023 1231 3 | |||
01-03-2023 1231 3 | |||
... | |||
</pre> | |||
Voir aussi : | Voir aussi : |
Dernière version du 28 novembre 2023 à 10:59
<source lang='delphi'>function GetCounter(const iName:string):Integer;</source>
Cette méthode retourne la valeur d'un compteur.
Paramètre | Usage |
---|---|
Result | La valeur du compteur |
iName | Le nom du compteur |
Exemple :
Utilisation des compteurs:
<source lang="delphi">
//procedure TVueExport.RegleDerivation_EcritureNum; begin
Result := 'Counter(P,'+PieceRef+')';
end;
procedure TExportVue.doExport; begin
inst := TQueryExporter.Create; ... inst.SetCounter('P',0); ... ctn := inst.GetCounter('P'); inst.Export(TVueExport.CreateSelector(....)); ctn := inst.GetCounter('P') - ctn; ...
end; </source>
Vue : DatePiece PieceRef EcritureNum 01-01-2023 1230 1 01-01-2023 1230 1 01-01-2023 1230 1 01-02-2023 1232 2 01-02-2023 1232 2 01-02-2023 1232 2 01-03-2023 1231 3 01-03-2023 1231 3 ...
Voir aussi :
{{#if:QueryExporter (tech)|
{{#if:QueryExporter (tech)|— QueryExporter (tech) |}} — Développement DSM —
|
{{#if:|— [[{{{1}}}]] |}} — Développement DSM —
}}