Create a query in run time
Hi all,
I need to create a report in run time with a parameters introduced by the user in the dialog page. I dont??t know passing these parameters to query, the report show me the next error:
'Incorrect arguments, outside the allowed interval or in conflict with others.'
I put the code to see if can you help me
ADOQuery1.Sql.Clear;
ADOQuery1.Sql.Add('SELECT v.TipoFijo, (select t.Descripcion from TipoCartera t where t.CodCartera = v.xCodCartera) AS DesCartera, ');
ADOQuery1.Sql.Add (' v.CodReceptor, v.Contador, v.NumFactura, v.Plazo, v.FechaDoc, v.FechaVto, ');
ADOQuery1.Sql.Add (' v.Importe, v.ImpGastos, v.Situacion, v.FechaCobro, v.Contabilizado ');
ADOQuery1.Sql.Add (' FROM VENCIMIENTOS v ');
ADOQuery1.Sql.Add (' WHERE (v.NumFactura = :DocDesde) ');
ADOQuery1.ParamByName('DocDesde').Value := edDocDesde.Text;
Thank you very much!!!!
I need to create a report in run time with a parameters introduced by the user in the dialog page. I dont??t know passing these parameters to query, the report show me the next error:
'Incorrect arguments, outside the allowed interval or in conflict with others.'
I put the code to see if can you help me
ADOQuery1.Sql.Clear;
ADOQuery1.Sql.Add('SELECT v.TipoFijo, (select t.Descripcion from TipoCartera t where t.CodCartera = v.xCodCartera) AS DesCartera, ');
ADOQuery1.Sql.Add (' v.CodReceptor, v.Contador, v.NumFactura, v.Plazo, v.FechaDoc, v.FechaVto, ');
ADOQuery1.Sql.Add (' v.Importe, v.ImpGastos, v.Situacion, v.FechaCobro, v.Contabilizado ');
ADOQuery1.Sql.Add (' FROM VENCIMIENTOS v ');
ADOQuery1.Sql.Add (' WHERE (v.NumFactura = :DocDesde) ');
ADOQuery1.ParamByName('DocDesde').Value := edDocDesde.Text;
Thank you very much!!!!