1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
if Jnl = 'Envois' then begin
// Requête pour ne selectionner que les envois entre 2 dates
with FrmClient.DsetJnl do begin
Active := False;
CommandText := 'SELECT * FROM File WHERE Etat=5';
CommandText := CommandText + ' And (DateEnvoi BETWEEN :DateDeb AND :DateFin)';
Parameters.ParamByName('DateDeb').Value := xDateDeb;
Parameters.ParamByName('DateFin').Value := xDateFin;
if cxCbExp.ItemIndex <> 0 then
CommandText := CommandText + ' AND ExpNom=' + QuotedStr(cxCbExp.Text);
CommandText := CommandText + ' ORDER BY DateEnvoi';
Prepared := True;
Active := True;
if recordcount <= 0 then begin
showmessage('Il n''y a rien à éditer dans le journal des envois...');
exit;
end;
end;
rvproject1.Open;
// Renseignement des paramètres de l'état
rvproject1.SetParam('Titre', 'Journal des télécopies envoyées');
rvproject1.SetParam('Err_Ident', 'Identifiant');
if cxCbExp.ItemIndex = 0 then
rvproject1.SetParam('ExpNom', '(Tous les expéditeurs)')
else
rvproject1.SetParam('ExpNom', '(' + CxCbExp.Text +')');
// Selection du rapport et édition
rvProject1.SelectReport('EdJnlFax', False);
rvSystem1.SystemSetups := rvSystem1.SystemSetups - [ssAllowSetup];
rvProject1.Execute;
rvproject1.close;
if cxCbPurge.Checked then Purge('Envois');
end; |
Partager