Hola estoy utilizando fast report debido a que estoy teniendo problema con los programas cuando utilizo crystal report. Deseo que un reporte el cual logre hacer en fast report se orderne por un campo y se agrupe por 2 o viceversa (En crystal no me tomo mas de 10 min realizarlo). Ademas necesito totalizar en un campo 2 valores por cada registro.
Utilizando delphi 7, fast report 4.9.32.
Campo importantes mes, tipotra, itbis(iva), valorfactura
Aca dejo el codigo para que vean y me ayuden, ya que utilize el wizard de fastreport pero aun asi no logro me ordene o agrupe bien.
Código Delphi
[-]procedure Tfrmgenerar606.AdvGlassButton4Click(Sender: TObject);
var
ruta : string;
ano, mes, dia : Word;
anop : Integer;
begin
anop := 0;
ruta := ExtractFilePath(Application.ExeName)+'\';
DecodeDate(Date,ano,mes,dia);
repeat until TryStrToInt(InputBox('AÑO DEL PERIODO', 'PERIODO',''),anop);
with dm.sql606 do
begin
Close;
SQL.Clear;
SQL.Text := 'SELECT [606].TIPOTRA, [606].MES, [606].PERIODO, [606].ANO, [606].RNC, [606].TIPODOC, [606].NCF, [606].NCFMODIFICA, [606].FECHACOMPRA, [606].FECHAPAGO, [606].ITBIS, [606].ITBISRET, [606].MONTOFACT, [606].RETENCION10PORC'+
' FROM 606'+
' GROUP BY [606].TIPOTRA, [606].MES, [606].PERIODO, [606].ANO, [606].RNC, [606].TIPODOC, [606].NCF, [606].NCFMODIFICA, [606].FECHACOMPRA, [606].FECHAPAGO, [606].ITBIS, [606].ITBISRET, [606].MONTOFACT, [606].RETENCION10PORC'+
' HAVING ((([606].ANO)='+IntToStr(anop)+'))'+
' ORDER BY [606].TIPOTRA, [606].MES;';
Open;
if dm.sql606.RecordCount < 1 then
begin
ShowMessage('No existen datos para este registro');
Exit;
end
else
begin
frxReport1.LoadFromFile(ruta+'Listado606.fr3');
frxReport1.PrepareReport;
If frxReport1.PrepareReport Then
frxReport1.ShowPreparedReport;
end;
end;
end;
Favor ayuden con cualquier conocimiento, ya que no encuentro mucho sobre fastreport, gracais de antemano.