FastReport VCL是用于 Delphi、C++ Builder、RAD Studio 和 Lazarus 的报告和文档创建 VCL 库。它提供了可视化模板设计器,可以访问 30 多种格式,并可以部署到云、网站、电子邮件和打印中。
显示样式集列表以及所选样式的应用
样式库经常用于在诸如“ComboBox”或“ListBox”之类的控件中显示可访问的样式集。之后,由用户选择的集合应用于报告。
显示列表:
StyleSheet.GetList(ComboBox1.Items);
将所选集用于报告:
frxReport1.Styles := StyleSheet.Items[ComboBox1.ItemIndex];
或者
frxReport1.Styles := StyleSheet.Find[ComboBox1.Text];
修改/添加/删除样式集
修改具有指定名称的集合:
var
Styles: TfrxStyles;
StyleSheet: TfrxStyleSheet;
{ search for the required set }
Styles := StyleSheet.Find('Styles2');
{ modify a style with the Style1 name from the found set }
with Styles.Find('Style1') do
Font.Name := 'Arial Black';
将集合添加到库:
var
Styles: TfrxStyles;
StyleSheet: TfrxStyleSheet;
{ the third set }
Styles := StyleSheet.Add;
Styles.Name := 'Styles3';
从库中删除一个集合:
var
i: Integer;
StyleSheet: TfrxStyleSheet;
{ search for the third set }
i := StyleSheet.IndexOf('Styles3');
{ if find, delete }
if i <> -1 then
StyleSheet.Delete(i);
保存和加载样式库
样式库的文件扩展名默认为“FSS”。
var
StyleSheet: TfrxStyleSheet;
StyleSheet.SaveToFile('c:\1.fss');
StyleSheet.LoadFromFile('c:\1.fss');
如果您对FastReport 动物,欢迎加入FastReport QQ 交流群:702295239
还想要更多吗?您可以点击阅读【FastReport报表2021最新资源盘点】,查找需要的教程资源。上是FastReport .NET正在慧都网火热销售中!>>查看价格详情
本站文章除注明转载外,均为本站原创或翻译
欢迎任何形式的转载,但请务必注明出处,尊重他人劳动成果
转载请注明:文章转载自:FastReport控件中文网 [https://www.fastreportcn.com/]
本文地址:https://www.fastreportcn.com/post/3121.html
欢迎任何形式的转载,但请务必注明出处,尊重他人劳动成果
转载请注明:文章转载自:FastReport控件中文网 [https://www.fastreportcn.com/]
本文地址:https://www.fastreportcn.com/post/3121.html
联系电话:023-68661681

返回