unit main;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, RpCon, RpDefine, RpRave, StdCtrls;
type
TForm1 =
class(TForm)
RvProject1: TRvProject;
RvCustomConnection1: TRvCustomConnection;
Button1: TButton;
procedure RvCustomConnection1Restore(Connection: TRvCustomConnection);
procedure RvCustomConnection1Open(Connection: TRvCustomConnection);
procedure RvCustomConnection1GetRow(Connection: TRvCustomConnection);
procedure RvCustomConnection1GetCols(Connection: TRvCustomConnection);
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
with RvProject1
do
begin
Open;
SelectReport('
Testreport', false);
Execute;
Close;
end;
end;
procedure TForm1.RvCustomConnection1Open(Connection: TRvCustomConnection);
begin
Connection.DataRows := 5;
Connection.dataindex := 0;
end;
procedure TForm1.RvCustomConnection1GetCols(Connection: TRvCustomConnection);
begin
Connection.WriteField('
lfdNr', dtString, 1, '
lfdNr', '
');
Connection.WriteField('
Feld1', dtString, 5, '
Feld1', '
');
Connection.WriteField('
Feld2', dtString, 5, '
Feld2', '
');
Connection.WriteField('
Feld3', dtString, 5, '
Feld3', '
');
Connection.WriteField('
Feld4', dtString, 5, '
Feld4', '
');
end;
procedure TForm1.RvCustomConnection1GetRow(Connection: TRvCustomConnection);
begin
Connection.WriteStr(IntToStr(Connection.dataindex+1));
Connection.WriteStr('
Wert für Feld 1');
Connection.WriteStr('
Wert für Feld 2');
Connection.WriteStr('
Wert für Feld 3');
Connection.WriteStr('
Wert für Feld 4');
end;
procedure TForm1.RvCustomConnection1Restore(Connection: TRvCustomConnection);
begin
Application.ProcessMessages;
end;
end.