2014-05-08 77 views

回答

0

從例如PrintStringList從FastReport中的演示文件夾:

var 
    Button1: TButton; 
    StringDS: TfrxUserDataSet; 
    frxReport1: TfrxReport; 
    StringList: TStringList; 

procedure TForm1.Button1Click(Sender: TObject); 
begin 
    StringDS.RangeEnd := reCount; 
    StringDS.RangeEndCount := StringList.Count; 
    frxReport1.ShowReport; 
end; 

procedure TForm1.frxReport1GetValue(const VarName: String; var Value: Variant); 
begin 
    if AnsiCompareText(VarName, 'element') = 0 then 
    Value := StringList[StringDS.RecNo]; 
end; 
+0

你可以添加在回答這些演示的相關部分?它會讓你的答案獨立。請參閱http://stackoverflow.com/help/referencing – Onots

相關問題