1.控件对象:fastreport 中frxReport1 ,frxUserDataSet1
设置frxUserDataSet1属性
frxUserDataSet1.RangeEnd := reCount;
frxUserDataSet1.RangeEndCount := lv1.items.Count;
在报表空间中增加frxUserDataSet1 ,在masterdata 中设置 字段名称 ,
在frxReport1 中getValue 中解析对应的值例如
if CompareText(VarName,'sspecification')=0 then
Value := item.Caption ;
if CompareText(VarName,'scode')=0 then
Value := item.SubItems.Strings[0];
if CompareText(VarName,'unitsName')=0 then
Value := item.SubItems.Strings[1];
if CompareText(VarName,'sname')=0 then
Value := item.SubItems.Strings[2];