I can't open text file from RAP

Hi!

I trying to open a text file with this code

procedure GlobalOnCreate;
var
lField: TppField;
begin
pDBPipe:=TppTextPipeline.Create(Nil);
pDBPipe.filename:='Customer.txt';
pDBPipe.UserName:='TxtPipeline';
pDBPipe.FileType:=ftFixedLength;
Report.DataPipeline:=pDBPipe;

lField := TppField.Create(pDBPipe);
lField.DataPipeline := pDBPipe;
lField.FieldName := 'Company';
lField.FieldAlias := 'Company';
lField.FieldLength := 30;
lField.DataType := dtString;
lField.DisplayWidth := 10;
lField.Visible:=true;
lField.Position :=0;
DBText2.dataField :='Company';
DBText1.DataPipeline := pDBPipe;


This code isn't work to print report

What am I doing wrong?

Thanks

Comments

Sign In or Register to comment.