Ver Mensaje Individual
  #6  
Antiguo 28-03-2022
Avatar de oscarac
[oscarac] oscarac is offline
Miembro Premium
 
Registrado: sep 2006
Ubicación: Lima - Perú
Posts: 2.010
Reputación: 20
oscarac Va por buen camino
ya esta....
investigue en como modificar el constructor del create y me funciona.



cuando lo invoco

Código Delphi [-]
 frmCatalogoPlato := TfrmCatalogoPlato.Create(Owner, 'I', qryInsumosKOd.Asstring);
  frmCatalogoPlato.Show;


en el formulario....
Código Delphi [-]
 constructor Create(AOwner: TComponent; Origen, Codigo: String); virtual;

Código Delphi [-]
constructor TfrmCatalogoPlato.Create(AOwner: TComponent; Origen, Codigo: String);
 //procedure TfrmCatalogoPlato.FormCreate(Sender: TObject);
var strSql : string;
begin
  inherited create(Owner);
  dmGlobal.vResultVar := '';
  dmGlobal.vResultTexto := '';
  if Origen = 'M' then
    StrSql := 'Select * from TblPlato where Empresa = :Empresa order by Kod'
  else
    StrSql := 'Select * from TblPlato C ' +
              'Left Join tblPlatoD D on c.Empresa = d.empresa and c.KOD = d.kod ' +
              'where C.Empresa = :Empresa and d.codigo = ' + QuotedStr(Codigo);


funciona como quiero...
__________________
Dulce Regalo que Satanas manda para mi.....
Responder Con Cita