如何在delphi中将列表视图项添加到数据集中?
我正在开发发票系统 在我的应用程序中有一个listview、一个fastreport和一个按钮。。 按下按钮时,报告应显示报告中的所有项目如何在delphi中将列表视图项添加到数据集中?,delphi,delphi-7,delphi-xe,fastreport,Delphi,Delphi 7,Delphi Xe,Fastreport,我正在开发发票系统 在我的应用程序中有一个listview、一个fastreport和一个按钮。。 按下按钮时,报告应显示报告中的所有项目 有人能为此提供最佳解决方案吗?来自FastReport演示文件夹的示例PrintStringList: var Button1: TButton; StringDS: TfrxUserDataSet; frxReport1: TfrxReport; StringList: TStringList; procedure TForm1.Butt
有人能为此提供最佳解决方案吗?来自FastReport演示文件夹的示例PrintStringList:
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;
你能在答案中添加这些演示的相关部分吗?这将使你的答案独立。看见