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

推荐订阅源

T
Tenable Blog
H
Heimdal Security Blog
K
Kaspersky official blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
S
Schneier on Security
G
GRAHAM CLULEY
U
Unit 42
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
C
CERT Recently Published Vulnerability Notes
Google DeepMind News
Google DeepMind News
罗磊的独立博客
Stack Overflow Blog
Stack Overflow Blog
阮一峰的网络日志
阮一峰的网络日志
Simon Willison's Weblog
Simon Willison's Weblog
C
Cisco Blogs
Cyberwarzone
Cyberwarzone
T
The Exploit Database - CXSecurity.com
Project Zero
Project Zero
Security Archives - TechRepublic
Security Archives - TechRepublic
www.infosecurity-magazine.com
www.infosecurity-magazine.com
博客园 - 司徒正美
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
V
Visual Studio Blog
博客园 - Franky
Engineering at Meta
Engineering at Meta
WordPress大学
WordPress大学
Jina AI
Jina AI
P
Proofpoint News Feed
P
Proofpoint News Feed
有赞技术团队
有赞技术团队
L
LINUX DO - 最新话题
宝玉的分享
宝玉的分享
N
News and Events Feed by Topic
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
博客园 - 聂微东
T
The Blog of Author Tim Ferriss
Spread Privacy
Spread Privacy
Application and Cybersecurity Blog
Application and Cybersecurity Blog
IT之家
IT之家
S
Security Affairs
博客园 - 叶小钗
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
小众软件
小众软件
N
News | PayPal Newsroom
Cloudbric
Cloudbric
AWS News Blog
AWS News Blog
W
WeLiveSecurity
The Last Watchdog
The Last Watchdog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
NISL@THU
NISL@THU

博客园 - DarroldYang

linux 多线程,锁同步 Saas模式数据库层数据架构以及数据删除处理 ASP.NET MVC 自定义过滤属性实现Enterprise的log功能 ASP.NET MVC 请求生命周期 ASP.NET MVC HtmlHelper类的方法总结 - DarroldYang (Windows 7 IIS 7.5里面的 IIS and Built-in Accounts) IIS和内置帐户的IIS 用户控件,事件的触发顺序 IIS7.0 An ASP.NET setting has been detected that does not apply in Integrated managed pipeline mode 转ORACLE函数大全 ASP.NET AJAX 调用Service Method (Too simply) Office编程知识点汇总(3)--格式设置 Office编程知识点汇总(2)--基本工作表任务 Office编程知识点汇总:基本工作簿任务 asp.NET应用程序的技巧 Ajax Control Toolkit MutuallyExclusiveCheckBox 服务器端控件 Ajax Control Toolkit Slider 服务器端控件 Ajax Control Toolkit AlwaysVisibleControl 服务器端控件 Ajax Control Toolkit Accordion 服务器端控件 判断代码执行环境
CrystalReport的导出“Push”方式
DarroldYang · 2008-10-29 · via 博客园 - DarroldYang

导出CrystalReport的文件硬编码的格式

 1
 2CrystalDecisions.Shared.DiskFileDestinationOptions DiskOpts = new         CrystalDecisions.Shared.DiskFileDestinationOptions();//提供属性,以便获取和设置导出到磁盘时的文件名
 3            ReportDoc.ExportOptions.ExportDestinationType = CrystalDecisions.Shared.ExportDestinationType.DiskFile;//指定导出目标类型
 4            switch (ddlFormat.SelectedItem.Text)
 5            {
 6                case "Rich Text (RTF)":
 7                         ReportDoc.ExportOptions.ExportFormatType =   CrystalDecisions.Shared.ExportFormatType.RichText;//获取或设置导出格式类型。
 8                         DiskOpts.DiskFileName = "c:\\Output.rtf";//
 9                    break;
10                case "Portable Document (PDF)":
11                         ReportDoc.ExportOptions.ExportFormatType =   CrystalDecisions.Shared.ExportFormatType.PortableDocFormat;//获取或设置导出格式类型。
12                         DiskOpts.DiskFileName = "c:\\Output.pdf";//
13                    break;
14                case "MS Word (DOC)":
15                         ReportDoc.ExportOptions.ExportFormatType =   CrystalDecisions.Shared.ExportFormatType.WordForWindows;//获取或设置导出格式类型。
16                         DiskOpts.DiskFileName = "c:\\Output.doc";//
17                    break;
18                case "MS Excel (XLS)":
19                         ReportDoc.ExportOptions.ExportFormatType =   CrystalDecisions.Shared.ExportFormatType.Excel;//获取或设置导出格式类型。
20                         DiskOpts.DiskFileName = "c:\\Output.xls";//
21                    break;
22                default:
23                    break;
24            }

25            ReportDoc.ExportOptions.DestinationOptions = DiskOpts;//导出过程中访问格式选项的首选方式
26             ReportDoc.Export();//道出报表方法rt()

2。打映的硬编码方式

 1                        // 指定打印机名称,这里是网络工作站Gigi上的打印机Hp Jet 6     
 2            string strPrinterName; 
 3            strPrinterName = @"Canon Bubble-Jet BJC-210SP";
 4            // 设置打印页边距 
 5            PageMargins margins; 
 6            margins = ReportDoc.PrintOptions.PageMargins; 
 7            margins.bottomMargin = 250
 8            margins.leftMargin = 350
 9            margins.rightMargin = 350
10            margins.topMargin = 450;     
11            ReportDoc.PrintOptions.ApplyPageMargins(margins);     
12            //应用打印机名称 
13            ReportDoc.PrintOptions.PrinterName = strPrinterName;     
14            // 打印    // 打印报表。将 startPageN 和 endPageN 
15            // 参数设置为 0 表示打印所有页。
16            ReportDoc.PrintToPrinter(1false,0,0);     

3.完整的代码留下足迹,发给抛下砖头的人,呵呵