El error (como siempre) era mio.
Es así, como lo debo hacer:
Código Delphi [-]
procedure TDMInstalgas_2.ADOQ_Control_ComercialCalcFields(
DataSet: TDataSet);
begin
DMInstalGas_2.ADOSP_AcumulaObrasPeriodoFacturacionComercial.Close;
DMInstalGas_2.ADOSP_AcumulaObrasPeriodoFacturacionComercial.Parameters[1].Value := DMInstalGas_2.ADOQ_Control_ComercialCodCon_Obr.Value;
DMInstalGas_2.ADOSP_AcumulaObrasPeriodoFacturacionComercial.Open;
DMInstalGas_2.ADOSP_AcumulaObrasPeriodoFacturacionComercial.ExecProc;
DMInstalGas_2.ADOQ_Control_ComercialAcuValExt_Cal.Value := DMInstalGas_2.ADOSP_AcumulaObrasPeriodoFacturacionComercial.Fields[0].Value - DMInstalGas_2.ADOQ_Control_ComercialTotImp_Obr.Value;
end;
Gracias a tod@s.
__________________
El meu país és tan petit, que des de dalt d'un campanar es pot veure el campanar veí.
|