Sorry but is the first time that I use a forum and I have some difficulties on writing in English because I’m Portuguese from Azores islands, but I will try.
I have using QuickReport in Delphi 6 like this example:
procedure TfrmDockChildFiles.EditPrintExecute(Sender: TObject);
var
iLeft : Integer;
sTitle : String;
LQuickRep : TQuickRep;
LQRLabel : TQRLabel;
LQRDBText : TQRDBText;
begin
inherited;
sTitle := GetLongHint(FModalAction.Hint);
if Copy(sTitle,Length(sTitle),Length(sTitle)) = '.' then sTitle := Copy(sTitle,1,Length(sTitle)-1);
sTitle := UpperCase(sTitle);
LQuickRep := TQuickRep.Create(Self);
LQuickRep.DataSet := dsFile.DataSet;
LQuickRep.Bands.HasColumnHeader := True;
LQuickRep.Bands.HasDetail := True;
LQuickRep.Bands.ColumnHeaderBand.Frame.DrawBottom := True;
LQuickRep.Bands.ColumnHeaderBand.Height := LQuickRep.TextHeight(LQuickRep.Bands.ColumnHeaderBand.Font,'X') + 3;
LQuickRep.Bands.DetailBand.Height := LQuickRep.TextHeight(LQuickRep.Bands.DetailBand.Font,'X');
iLeft := 0;
LQRLabel := TQRLabel.Create(LQuickRep);
LQRLabel.Name := 'LQRLabelCod' ;
LQRLabel.Parent := LQuickRep.Bands.ColumnHeaderBand;
LQRLabel.Caption := fraFileMostrar.DBGridFiles.Columns[0].Title.Caption;
LQRLabel.Left := iLeft;
LQRLabel.Width := fraFileMostrar.DBGridFiles.Columns[0].Width;
LQRDBText := TQRDBText.Create(LQuickRep);
LQRDBText.Name := 'LQRDBTextCod';
LQRDBText.Parent := LQuickRep.Bands.DetailBand;
LQRDBText.DataSet := LQuickRep.DataSet;
LQRDBText.DataField := fraFileMostrar.DBGridFiles.Columns[0].FieldName;
LQRDBText.Left := iLeft;
LQRDBText.Width := fraFileMostrar.DBGridFiles.Columns[0].Width;
iLeft := iLeft + LQRLabel.Width ;
LQRLabel := TQRLabel.Create(LQuickRep);
LQRLabel.Name := 'LQRLabelMostrarNome' ;
LQRLabel.Parent := LQuickRep.Bands.ColumnHeaderBand;
LQRLabel.Caption := fraFileMostrar.DBGridFiles.Fields[1].DisplayName;
LQRLabel.Left := iLeft;
LQRLabel.Width := fraFileMostrar.DBGridFiles.Columns[1].Width;
LQRDBText := TQRDBText.Create(LQuickRep);
LQRDBText.Name := 'LQRDBTextMostrarNome';
LQRDBText.Parent := LQuickRep.Bands.DetailBand;
LQRDBText.DataSet := LQuickRep.DataSet;
LQRDBText.DataField := fraFileMostrar.DBGridFiles.Fields[1].FieldName;
LQRDBText.Left := iLeft;
LQRDBText.Width := fraFileMostrar.DBGridFiles.Columns[1].Width;
frmPreview.ShowReport(LQuickRep,sTitle);
end;
I’m trying doing something like this in Rave Report. I thing is possible but I’m just starting with Rave.