unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, TeEngine, Series, ExtCtrls, TeeProcs, Chart, RpCon,
RpDefine, RpRave;
type
TForm1 = class(TForm)
RvProject1: TRvProject;
RvCustomConnection1: TRvCustomConnection;
Chart: TChart;
Series1: TLineSeries;
Button1: TButton;
Button2: TButton;
procedure RvCustomConnection1GetCols(Connection: TRvCustomConnection);
procedure RvCustomConnection1GetRow(Connection: TRvCustomConnection);
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
uses RPTChart;
{$R *.dfm}
procedure TForm1.RvCustomConnection1GetCols(
Connection: TRvCustomConnection);
begin
with Connection do begin
// PieChart is the name of the DataField that you will use in Rave
WriteField('PieChart', dtGraphic, 0, '', '');
end;
end;
procedure TForm1.RvCustomConnection1GetRow(
Connection: TRvCustomConnection);
begin
// Chart is the name of the TChart component you are wanting to print
WriteChartData(Connection, Chart);
end;
procedure TForm1.Button1Click(Sender: TObject);
var
p2,u1,f1,p,m1,kmp,kmk,sn,w1,k,w2n,mn,mp,mk,a,sk,n2,n1,L19,L20,L21,x,y,M19,M20,M2 1:real;
str:string;
s,c: Integer;
begin
Mk:=100;
sk:=10;
a:=1;
series1.Clear;
for s := 0 to round(sk*100) do
Chart.SeriesList[0].AddXY((Mk*(s/100)*sk*(2 + a))/(s*s/10000 + sk*sk + s* sk*a/100),s/100,'',clRed);
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
RvProject1.Execute;
end;
end.