如何在Delphi中将列表视图项添加到数据集中? [英] How to add List view item into dataset in delphi?

查看:80
本文介绍了如何在Delphi中将列表视图项添加到数据集中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发发票系统

在我的应用程序中,有一个列表视图,一个快速报告按钮。.
当按下报告应显示的​​按钮时报告
中的所有项目,谁能为此提供最佳解决方案?

in my application there is a listview, a fastreport, button.. when press the the button the report should show the all item in the report can anyone provide best solution for this?

推荐答案

来自FastReport的Demos文件夹中的示例PrintStringList :

From example PrintStringList from FastReport's Demos folder:

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;

这篇关于如何在Delphi中将列表视图项添加到数据集中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆