报表控件ActiveReports快速入门指南 - 链接Oracle数据库(v13及更低版本)

ActiveReports 是一款专注于 .NET 和 .NET Core 平台的报表控件。通过拖拽式报表设计器,可以快速地设计 Excel表格、Word文档、图表、数据过滤、数据钻取、精准套打等类型报表,全面满足 WinForm、ASP.NET、ASP.NET MVC、WPF 平台中各种报表的开发需要。同时,通过丰富的 API 可以灵活的实现报表创建、加载和运行时的个性化自定义需求。

ActiveReports正式版下载

ActiveReports 很早开始就已经支持Oracle数据库了,那这篇文章,我们就来学习如何搭建ActiveReports支持的Oracle环境及设置Oracle数据源。

ActiveReports 报表能否正常连接Oracel数据源取决于 Oracle的数据库驱动安装是否成功,因此安装Oracle数据驱动的版本和型号非常重要。

一、安装Oracle 数据库驱动

注意:ActiveReports仅支持32位的Oracel数据库驱动,因此在安装Oracle数据库驱动时一定要安装32位驱动。

下载地址:win32_11gR2_client.zip

安装32位驱动时,选择”管理员“,这样才能保证安装成功,否则安装不完全,也能导致ActiveReports无法连接数据库。

报表控件ActiveReports快速入门指南:链接Oracle数据库(v13及更低版本)

选择”下一步“,最后安装完成后,点击确定。

驱动安装成功后,我们的连接工作就已经完成一半了。

二、使用ActiveReports报表设计器连接数据库

注意: 字符串的编写

  • 添加数据源,选择Oracle Client Provider
  • 输入服务器名称, 格式:”IP/Oracle服务名“,如10.32.0.200/ORCL
  • 输入用户名和密码
  • 点击连接字符串AR会根据您的输入,自动生成字符串,点击”√“验证是否连接成功。

报表控件ActiveReports快速入门指南:链接Oracle数据库(v13及更低版本)

报表控件ActiveReports快速入门指南:链接Oracle数据库(v13及更低版本)

如果按照上述步骤,无法正确连接,请尝试以下操作:

1. 修改连接字符串的为,因为有可能服务器端给出的是实例名 SID 而不是服务名,所以需要修改连接字符串如下:

Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.23)(PORT=1521)) (CONNECT_DATA=(SID=myDB)));User Id=test;Password=123456;

OLE EB方式:
Provider=OraOLEDB.Oracle.1;Password=888;Persist Security Info=True;User ID=label;Data Source=pyoracle

2. 如果在使用AR控件的C#程序项目中,连接Oracle数据库有问题,显示如下错误信息:
未能加载文件或程序集“Oracle.DataAccess”或它的某一个依赖项。试图加载格式不正确的程序。
那么可以尝试以下方法:

(1)不要引用Oracle提供的ODP.NET组件(Oracle.DataAccess.dll),改为引用微软的System.Data.OracleClient:
微软的:
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Data.OracleClient.dll

(2)代码中用到OracleConnection类的地方,要修改using语句:
加上:using System.Data.OracleClient;
同时注释掉Oracle Provider的相关using语句:
//using Oracle.DataAccess.Types;
//using Oracle.DataAccess.Client;

(3)安装Oracle客户端。
System.Data.OracleClient本身只是一个接口,并没有连接Oracle数据库的能力。
如果不安装Oracle客户端,程序可能报出如下错误信息:
System.Data.OracleClient requires Oracle client software version 8.1.7 or greater.

3. 如果访问Unix 的Oracle数据库出现TNS 12514错误,可能原因如下:

  • 服务器上的服务名并非ServiceName而是SID。
    解决方法: 可以在Net Manager中设置服务命名时,选中【使用Oracle8发行版8.0兼容标识】,然后在SID框中输入服务名。

报表控件ActiveReports快速入门指南:链接Oracle数据库(v13及更低版本)

这个服务命名的配置信息保存在X:\app\xxx\product\11.2.0\client_1\network\admin目录下的tnsnames.ora文件中,可以看到常见的(Service_Name=xxx)会变成(SID=xxx)。
需要注意的是,只有Net Manager有那个SID的选项,用Net Configuration Assistant配置本地网络服务名时,没有机会指定SID,似乎只接受ServiceName,因此,如果网管提供的服务名只是SID而不是ServiceName的话,测试连接时就会一直提示12514错误。

4. 使用AR开发的ASP.NET应用程序,可能在部署之后查看报表报错
No Data Provider found for the data provider type 'Oracle'.
可能的原因是AR的版本低于AR 10.1.*
只需下载AR 10.1.*或更新版本,安装到IIS所在电脑(不必先卸载旧版本),
然后将C:\Program Files (x86)\Common Files\GrapeCity\ActiveReports 10目录下的
GrapeCity.ActiveReports.*.dll文件复制到ASP.NET应用程序部署目录下的bin子目录下。

本文内容源自葡萄城

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
ActiveReports 7 2013 V1 3/4 共四个压缩文件,请全部下载后解压 Award-winning .NET reporting tool for Silverlight, Windows Forms, ASP.NET, and Windows Azure with an end-user Report Designer, Visual Studio integration, and more. Multi-platform Reporting Component with Pure Power The award-winning .NET reporting tool for Silverlight, Windows Forms, ASP.NET, and Windows Azure provides Microsoft .NET developers with familiar Visual Studio integrated designers and components, as well as an extensive API. Create reports ranging in functionality from form-based reports such as invoices and insurance documents, to transaction reports such as sales and accounting, to analytical reports such as sales and budget analysis and portfolio analysis. * ActiveReports joined the ComponentOne product line on July 1, 2012, when ComponentOne became a division of GrapeCity. See what's new in the ActiveReports 7 release! Why Choose ActiveReports 7? Multiple Report Types to Fit Your Reporting Needs Fixed Page Layout gives developers a new way of creating reports where layout is the primary focus. Great for creating invoices, prospectus reports, forms, or other highly structured reports. Continuous Page Layout makes it easy to create reports using tables, crosstabs, charts, and other data regions with flexible layouts. Section Reports follow the tradition of previous ActiveReports versions and are similar to Access reports. Using code-behind or scripts, you can respond to the various events that occur while the report generates to create extremely customized reports that are hard to produce with other products. Fast .NET Reporting Engine Fast .NET Reporting Engine ActiveReports 7 is optimized for speed. Its unique architecture allows the lean reporting engine to quickly read records from the data source and immediately render them to the output device. The simplicity of the design allows the data to pass through quickly from processing to rendering. Flexible .NET API The extensive ActiveReports 7 API allows Visual Basic and C# developers to completely control the report processing engine to fit their needs. Events and properties control: Data retrieval Data transformation Layout Rendering In addition, the API gives the developer complete control over the rendered document to allow selective printing or export, post-render drawing or stamping on pages, n-page, and booklet printing. For added control, ActiveReports 7 provides unmanaged access to the print job, allowing tray selection and duplex printer management as the document is rendered to the printer. Data Visualization and Layout Data Visualization and Layout Whether you need a simple listing or groups with keep-together control, master-detail reports, sub-reports, horizontal and vertical multi-column reports, address labels and badges, or richly formatted letters with mail merge support, ActiveReports is the solution. Simple and lightweight report controls allow you to easily create dazzling reports. With a selection including textbox, checkbox, line, shape, cross-section box, image, formatted text with mail merge, barcode (2D and 3D), chart, and other data visualization controls, they support a wide range of business reports. You can create reports of any size with nearly endless layout options. Rich Data Binding Rich Data Binding .NET data sources allow you to connect to any of the standard databases, plus .NET in-memory objects and collections. In addition, unbound data mode opens up the report to data from anywhere, in any form. If your application can access it, so can the report engine. Visual Studio Integrated Design Time Visual Studio Integrated Design Time The ActiveReports 7 report designer integrates with the Microsoft Visual Studio IDE allowing C# and Visual Basic developers to create reports and compile them into their Windows Forms, ASP.NET, and Silverlight applications. ActiveReports Professional Edition users can also use the royalty-free end-user report designer control to give similar report design functionality to end users within the business application. Cross-platform Support Cross-platform Support ActiveReports 7 offers versatile viewers to extend the reach of your reports to every platform. Built-in report viewers include Windows Forms, Adobe Flash, Microsoft Silverlight, and a rich HTML viewer, all with built-in search functions, hyperlink interaction, a table of contents, and multi-page zoom view support. ActiveReports includes Adobe PDF export with advanced encryption and international font support, Microsoft Excel export, and Rich Text Format (RTF) export. The extensive API allows fine control over the exported documents and their properties. The ActiveReports reporting engine supports cloud computing on Microsoft's Windows Azure platform under partial trust as well as full trust. Support for Migration from Other Reporting Tools Support for Migration from Other Reporting Tools ActiveReports 7 helps you preserve your past investments with easy report conversion from Microsoft Access and SAP Crystal Reports, thus greatly reducing the effort involved in recreating old reports when you migrate. No need to start from scratch! Global Options and Localization Support Global Options and Localization Support Localize the ActiveReports user interface to meet the needs of all of your international users. (There are fully localized Chinese and Japanese versions for those specific markets.) Localization also extends to the reports themselves: the reporting engine can use locale-specific text and formatting without the need to create multiple reports. Deployment Deployment ActiveReports 7 uses XCOPY deployment, making installation of your applications incredibly simple. There are no special merge modules to include, no licensing servers to install alongside your application, and no onerous activation procedures to go through.

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值