unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, DB, ppProd, ppClass, ppReport, ppComm, ppRelatv, ppDB, ppDBPipe,
ADODB, StdCtrls;
type
TForm1 = class(TForm)
A1: TADOStoredProc;
A3: TADOStoredProc;
A2: TADOStoredProc;
ppDBPipeline1: TppDBPipeline;
ppReport1: TppReport;
DataSource1: TDataSource;
DataSource2: TDataSource;
DataSource3: TDataSource;
Button1: TButton;
procedure A1AfterScroll(DataSet: TDataSet);
procedure A2AfterScroll(DataSet: TDataSet);
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.A1AfterScroll(DataSet: TDataSet);
begin
IF A1.Active then
begin
IF A2.Active then
A2.Close;
A2.Parameters.ParamValues['A'] := A1.FieldValues['A0'];
A2.Open ;
end;
end;
procedure TForm1.A2AfterScroll(DataSet: TDataSet);
begin
IF A2.Active then
begin
IF A3.Active then
A3.Close;
A3.Parameters.ParamValues['A'] := A2.FieldValues['A0'];
A3.Open ;
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
ppReport1.Print ;
end;
end.