Salu2 ya resolvi mi problema, gracias a los que ayudaron en algo...
publico el código para que a alguien mas le sirva, uno nunca sabe ....
Código Delphi
[-]
procedure TForm44.BitBtn1Click(Sender: TObject);
var
mes,ano:String;
begin
if ComboBox1.Text='Seleccione Mes' then
begin
Application.MessageBox('Disculpe, debe seleccionar un Mes','');
exit;
end;
if ComboBox2.Text='Seleccione Año' then
begin
Application.MessageBox('Disculpe, debe seleccionar un Año','');
exit;
end;
Form1.Table11.First;
With Form1.Table11 do
Begin
While not Eof do
begin
if (FieldValues['nogrupo']=5) or (FieldValues['nogrupo']=6) then
begin
if form1.Table14.Locate('unico',FieldValues['unico'],[]) then
begin
end
else
begin
With form1.Table14 do
Begin
Insert;
FieldValues['unico']:=form1.Table11.FieldValues['unico'];
FieldValues['Fecha']:=form1.Table11.FieldValues['Fecha'];
FieldValues['Grupo']:=Form1.Table11.FieldValues['Grupo'];
FieldValues['Des_cu']:=Form1.Table11.FieldValues['des_cu'];
FieldValues['debe']:=Form1.Table11.FieldValues['debe'];
Post;
end;
end;
end;
Next;
end;
End;
mes:=IntToStr(ComboBox1.ItemIndex+1);
ano:=ComboBox2.Text;
edit1.Text:='01'+'/'+mes+'/'+ano;
with Form45.Query1 do begin
Close;
SQL.Text := 'Select Fecha,grupo,des_cu,debe,haber '+
'from costosygastos.db '+
'where Extract(month from fecha) = '+IntToStr(MonthOf(StrToDate(Edit1.Text)))+
' and Extract(year from fecha) = '+IntToStr(YearOf(StrToDate(Edit1.Text)));
Open;
end;
form45.QRLabel1.Caption:='Costos y Gastos de '+ComboBox1.Text+' de '+ComboBox2.Text;
form45.QuickRep1.Preview;
exit;
end;
Saludos amigos