Digite em 'Pesquisar Dica' o que deseja procurar. Ex: DBGRID
PESQUISAR DICA:
RAVE REPORT - PEGANDO OBJETOS VIA PROGRAMACAO
// Ainda não foi testado. procedure TForm1.BitBtn1Click(Sender: TObject); var lReport: TRaveReport; lRegion: TRaveRegion; lBand: TRaveBand; lDataBand: TRaveDataBand; lDados: TRaveDataView; lDataText: TRaveDataText; begin RvProject2.New; lReport := RvProject2.ProjMan.ActiveReport; lReport.Name := 'TheClub'; lReport.FullName := 'TheClub'; lRegion := TRaveRegion.Create(lReport); lRegion.Name := 'Region'; lRegion.Parent := lReport.FirstPage; lRegion.Top := lReport.FirstPage.PageTop + RvSystem1.SystemPrinter.MarginTop; lRegion.Left := lReport.FirstPage.PageLeft + RvSystem1.SystemPrinter.MarginLeft; lRegion.Height := lReport.FirstPage.PageHeight - (RvSystem1.SystemPrinter.MarginBottom * 2); lRegion.Width := lReport.FirstPage.PageWidth - (RvSystem1.SystemPrinter.MarginRight * 2); lBand := TRaveBand.Create(lReport); lBand.Parent := lRegion; lBand.BandStyle.PrintLoc := lBand.BandStyle.PrintLoc + [plBodyHeader]; lBand.Name := 'Band'; with TRaveText.Create(lReport) do begin Name := 'Teste'; Parent := lBand; Text := 'Teste'; end; lDados := RvProject2.ProjMan.NewDataObject(TRaveDataView) as TRaveDataView; lDados.ConnectionName := 'RvCustomConnection1'; lDados.FullName := 'Dados'; lDados.Name := 'Dados'; CreateFields(lDados,nil,nil,true); lDataBand := TRaveDataBand.Create(lReport); with lDataBand do begin Parent := lRegion; DataView := lDados; BandStyle.PrintLoc := BandStyle.PrintLoc + [plDetail]; Name := 'DataBand1'; end; lDataText := TRaveDataText.Create(lReport); with lDataText do begin Parent := lDataBand; DataView := lDados; DataField := 'Codigo'; Name := 'Codigo'; end; lDataText := TRaveDataText.Create(lReport); with lDataText do begin Parent := lDataBand; DataView := lDados; DataField := 'Descricao'; Left := 2; Name := 'Descricao'; end; lBand.ControllerBand := lDataBand; RvProject2.Save; // Just if you want RvProject2.SaveToFile('c:\teste.rav'); RvProject2.Close; RvProject2.Execute; end;