I made a report with a ppmemo on it. I assigned the contents of a TStringList to the Lines property, then tried to run it. The report says that it is calculating until you hit the cancel button. Then it shows but you cannot print. Any ideas?
Where are you assigning the TppMemo.Lines property? In my testing with the following code below, the report generated correctly after assigning the Lines property before making the call to TppReport.Print.
procedure TForm1.Button1Click(Sender: TObject); var lStringList: TStringList; begin
lStringList := TStringList.Create;
try
lStringList.Clear;
lStringList.Add('Line number one'); lStringList.Add('Line number two'); lStringList.Add('Line number three');
Comments
Where are you assigning the TppMemo.Lines property? In my testing with the
following code below, the report generated correctly after assigning the
Lines property before making the call to TppReport.Print.
procedure TForm1.Button1Click(Sender: TObject);
var
lStringList: TStringList;
begin
lStringList := TStringList.Create;
try
lStringList.Clear;
lStringList.Add('Line number one');
lStringList.Add('Line number two');
lStringList.Add('Line number three');
ppMemo1.Lines.Assign(lStringList);
ppReport1.Print;
finally
lStringList.Free;
end;
end;
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com