惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园_首页
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
P
Proofpoint News Feed
G
Google Developers Blog
B
Blog
Engineering at Meta
Engineering at Meta
阮一峰的网络日志
阮一峰的网络日志
The Register - Security
The Register - Security
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - 叶小钗
The Cloudflare Blog
The Hacker News
The Hacker News
D
Darknet – Hacking Tools, Hacker News & Cyber Security
C
CXSECURITY Database RSS Feed - CXSecurity.com
雷峰网
雷峰网
F
Fortinet All Blogs
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
H
Hackread – Cybersecurity News, Data Breaches, AI and More
酷 壳 – CoolShell
酷 壳 – CoolShell
Last Week in AI
Last Week in AI
T
Threat Research - Cisco Blogs
A
About on SuperTechFans
量子位
Recorded Future
Recorded Future
博客园 - 三生石上(FineUI控件)
H
Help Net Security
Help Net Security
Help Net Security
P
Palo Alto Networks Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
T
Troy Hunt's Blog
W
WeLiveSecurity
V
Vulnerabilities – Threatpost
T
The Exploit Database - CXSecurity.com
Know Your Adversary
Know Your Adversary
Apple Machine Learning Research
Apple Machine Learning Research
Scott Helme
Scott Helme
N
News | PayPal Newsroom
AWS News Blog
AWS News Blog
D
DataBreaches.Net
Blog — PlanetScale
Blog — PlanetScale
MongoDB | Blog
MongoDB | Blog
B
Blog RSS Feed
腾讯CDC
J
Java Code Geeks
Microsoft Azure Blog
Microsoft Azure Blog
TaoSecurity Blog
TaoSecurity Blog
GbyAI
GbyAI
Y
Y Combinator Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
D
Docker

博客园 - Louis.Lu.Sz

在C#中,如果声明字段时不加关键字volatile,会影响多线程环境中对该字段的访问吗? Win10, Win11 Ping不通 Windows窗体控件库的小秘密 在windows桌面显示IP等信息的小工具分享 oracle,根据查询结果结构创建新表 Oracle多表关联如何更新多个字段 我想实现一个通用的配置读写类 【转】Android程序右上角不显示3个点的菜单 Visual studio项目调试时提示“ 你正在调试XXXX的发布版本。” 【原】记录一下第一次使用Python简单处理Excel 【原创】分享一种WPF列表数据的分页打印方案 [原创] 分享一种Asp.NetMVC WebApi作为后端技术结合Vue前端框架开发时开发环境的优雅配置方案 [原] c# winform controls 查找指定类型子控件的扩展方法 [转]Errors while building APK. You can find the errors in the 'Messages' view.解决办法 [转]oracle数据库转mysql数据库 SaveFileDialog下载模板文件 算法:把一个数字拆分成指定数字的和,允许数字个数为0和重复 WPF简单实现可以左右滑动的CheckBox复选框,样式模仿的微信 WPF里借助附加属性让DataGrid显示行号
FastReport使用笔记
Louis.Lu.Sz · 2022-05-26 · via 博客园 - Louis.Lu.Sz

实在是不想再用水晶报表了。

经新同事国林推荐,接触了FashReport,感觉不错。

通过下面的分享,最终使用起来了。非常感谢作者的分享。

https://blog.csdn.net/u013934107/article/details/110474617

记录一下主要的调用代码:

private void Print()
{
     // create report instance
            Report report = new Report();
            // load the existing report
            string rptFile = "A6.frx";
            if (!string.IsNullOrEmpty(cbxTemplate.Text))
            {
                rptFile = cbxTemplate.Text;
            }
            report.Load(rptFile);

List<LabelDataModel> labels = new List<LabelDataModel>();
//业务数据
// register the business object report.RegisterData(labels, "Labels"); if (cbDesign.Checked) { // design the report,打开设计器 report.Design(true); } else { if (chbPrintPreview.Checked) { // run the report report.Show(); } else { //直接打印 report.Prepare(); report.PrintSettings.Printer = cbxPrinter.Text; report.PrintSettings.Copies = 1; report.PrintSettings.ShowDialog = false; report.Print(); } } // free resources used by report report.Dispose(); } /// <summary> /// 加载打印模板 /// </summary> private void LoadPrintTemplate() { cbxTemplate.Items.Clear(); var temps = System.IO.Directory.GetFiles(Application.StartupPath, "*.frx", System.IO.SearchOption.TopDirectoryOnly); foreach (var fileName in temps) { var file = new System.IO.FileInfo(fileName); cbxTemplate.Items.Add(file.Name); } if (cbxTemplate.Items.Count > 0) { cbxTemplate.SelectedIndex = 0; } } //加载打印机 private void LoadPrinters() { cbxPrinter.Items.Clear(); foreach (object item in System.Drawing.Printing.PrinterSettings.InstalledPrinters) { cbxPrinter.Items.Add(item.ToString()); } cbxPrinter.SelectedIndex = 0; }