何时使用 RDLC 而不是 RDL 报告?

发布于 2024-07-26 06:03:07 字数 821 浏览 6 评论 0原文

过去几周我一直在研究 SSRS 2005 / 2008 并创建了一些服务器端报告。 对于某些应用,一位同事建议我针对特定情况研究 RDLC。 我现在正在尝试了解 RDL 和 RDLC 之间的主要区别。

搜索这些信息最多只能得到零散的信息。 我了解到:

  • RDLC 报告不存储有关如何获取数据的信息。
  • RDLC报告可以直接由ReportViewer控件执行。

但我仍然不完全理解RDLC文件和其他相关系统(报表服务器、源数据库、客户端)之间的关系。

为了更好地掌握 RDLC 文件,我想知道它们的使用与 RDL 文件有何不同,以及在什么情况下会选择 RDLC 而不是 RDL。 也欢迎提供资源链接。

更新:

ASP.NET 论坛上的帖子讨论了同样的问题。 从中,我对这个问题有了更多的了解。

RDLC 的一个功能是它可以在 ReportViewer 控件中完全在客户端运行。

  • 这消除了对 Reporting Services 实例的需要,甚至消除了对任何数据库连接的需要,但是:
  • 它增加了必须手动提供报表中所需数据的要求。

这是优点还是缺点取决于特定的应用。

在我的应用程序中,无论如何都有一个 Reporting Services 实例可用,并且可以轻松地从数据库中提取报告所需的数据。 我还有什么理由考虑 RDLC,还是应该坚持使用 RDL?

I have been studying SSRS 2005 / 2008 in the past weeks and have created some server side reports. For some application, a colleague suggested that I look into RDLC for that particular situation. I am now trying to get my head around the main difference between RDL and RDLC.

Searching for this information yields fragmented information at best. I have learned that:

  • RDLC reports do not store information about how to get data.
  • RDLC reports can be executed directly by the ReportViewer control.

But I still don't fully understand the relation between the RDLC file and the other related systems (the Reporting Server, the source database, the client).

In order to get a good grasp on RDLC files, I would like to know how their use differs from RDL files and in what situation one would choose RDLC over RDL. Links to resources are also welcome.

Update:

A thread on the ASP.NET forums discusses this same issue. From it, I have gained some better understanding on the issue.

A feature of RDLC is that it can be run completely client-side in the ReportViewer control.

  • This removes the need for a Reporting Services instance, and even removes the need for any database connection whatsoever, but:
  • It adds the requirement that the data that is needed in the report has to be provided manually.

Whether this is an advantage or a disadvantage depends on the particular application.

In my application, an instance of Reporting Services is available anyway and the required data for the reports can easily be pulled from a database. Is there any reason left for me to consider RDLC, or should I simply stick with RDL?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(10

邮友 2024-08-02 06:03:07

根据我的经验,这两件事几乎不需要考虑:

I. RDL 报告通常是托管报告。 这意味着您需要实施 SSRS 服务器。 它们是来自 SQL Server 的 Visual Studio 的内置扩展,用于报告语言。 当您安装 SSRS 时,您应该有一个名为“Business Intelligence Development Studio”的附加组件,使用报告比没有它更容易。

R eport

D efinition

L angauge

RDL 报告的优点:

  1. 您可以在为您运行服务的环境中托管报告。
  2. 您可以配置项目的安全性或继承级别以将安全性作为独立概念进行处理
  3. 您可以配置服务来发送电子邮件(前提是您有可以访问的 SMTP 服务器)并按计划保存文件
  4. 您有一个通常称为“的数据库” ReportServer'您可以查询发布后的报告信息。
  5. 您仍然可以通过使用 ASP.NET、WPF(带有 winform 控件 bleh!)或使用“ProcessingMode.Remote”的 .NET 中的 Winform 编写的客户端应用程序中的“ReportViewer”来访问这些报告。
  6. 您可以设置用户可以看到和使用的参数以获得更大的灵活性。
  7. 您可以将报表的一部分配置为用于连接字符串的“数据源”,也可以将 SQL 查询、XML 或其他数据集配置为“数据集”。 这些部分和其他部分可以被存储和配置为定期缓存数据。
  8. 您可以编写服务 http:// /ReportServer/ReportingService2010 或 /ReportExecution2005 的 .NET 代理类。 然后,您可以在 .NET 中编写自己的方法,用于直接通过代码托管 SSRS 报告的服务器的服务通过电子邮件发送、保存或操作 SSRS 数据。
    使用 ReportService2010.asmx 以编程方式从共享点导出 SSRS 报告缺点

  1. 与其他东西相比,SSRS 在快速启动方面有点不稳定。 大多数人对安全策略和将报告设计为 VS 的“附加”感到困惑。 SQL 2005 = VS BIDS 2005,SQL 2008 = VS BIDS 2008,SQL 2012 = VS BIDS 2010(笑)。
  2. 继续 1 恕我直言,安全设置策略过于复杂。 有服务器安全性、数据库安全性和角色,以及为服务托管的页面上的两个安全设置。 大多数人只设置了一个管理员,却无法进入,并想知道为什么其他用户不能进入。 根据我的经验,关于 SSRS 最常见的投诉或问题与进入有关。
  3. 您可以使用“表达式”来“增强”您的报告。 很多时候,你做的事情太多了,你的报告的性能就会变得很低。
  4. 您可以做并导出一定数量的事情。 据我所知,如果没有 javascript hack,SSRS 就不会悬停在报告上。
  5. 速度和性能可能会受到影响,因为愚蠢的 SSRS 配置会回收系统,并且第一份报告有时可能需要一段时间才能加载站点。 您可以通过更改它来解决这个问题,但我发现为其提供保持活动服务效果更好。

二. RDLC 报告是客户端包含的报告,不在任何地方托管。 名称中额外的 c 表示“客户端”。 通常,这是 RDL 语言的扩展,仅在 Visual Studio 客户端应用程序中使用。 当您添加“报告”项时,它就存在于 Visual Studio 中。

RDLC 报告的优点:

  1. 您可以更轻松地将 wcf 服务连接到数据集。
  2. 您可以更好地控制数据集,并且可以直接使用填充有实体框架对象或 ADO.NET 的 POCO 类以及表本身。 您可以在将数据绑定到报告之前对数据进行优化。
  3. 您可以直接在代码后面添加附加组件来自定义外观。

缺点:

  1. 您需要自己处理参数,虽然您可以实现包装器方法来帮助跑腿,但不幸的是,这比预期的要多一些。
  2. 用户无法查看“ReportViewer”控件中的参数,除非它处于远程模式并访问 RLD 报告。 因此,您需要在控件外部自己制作文本框、下拉菜单、单选按钮以传递给它。 有些人喜欢这样加控制,我个人不喜欢。
  3. 任何您想要为分发报告提供服务的事情都需要您自己构建。 发送电子邮件、订阅、保存。 抱歉,您需要在 .NET 中构建它,否则实现一个已经从上面执行此操作的代理,您可能只是使用托管报告。

老实说,我出于不同的目的都喜欢两者。 如果我想要向分析师提供一些他们一直使用的东西,并对图表、图表、钻取和导出到 Excel 进行调整,我会使用 RDL,并且让 SSRS 的站点完成处理电子邮件分发的所有跑腿工作。 如果我想要一个具有报告部分的应用程序,并且我知道该应用程序是它自己的具有规则和治理的模块,我会使用 RDLC 并让参数更小,并由用户在进入报告部分之前做出的决策驱动他们所在的客户和网站,然后他们通常只是选择一个时间范围或类型,仅此而已。 因此,一般来说,复杂的报告我会使用 RDL,而对于简单的报告,我会使用 RDLC 恕我直言。

From my experience there are few things to think about both things:

I. RDL reports are HOSTED reports generally. This means you need to implement SSRS Server. They are a built in extension of Visual Studio from SQL Server for the reporting language. When you install SSRS you should have an add on called 'Business Intelligence Development Studio' which is much easier to work with the reports than without it.

R eport

D efinition

L angauge

Benefits of RDL reports:

  1. You can host the reports in an environment that has services running for you on them.
  2. You can configure security on an item or inheriting level to handle security as a standalone concept
  3. You can configure the service to send out emails(provided you have an SMTP server you have access to) and save files on schedules
  4. You have a database generally called 'ReportServer' you can query for info on the reports once published.
  5. You can access these reports still through 'ReportViewer' in a client application written in ASP.NET, WPF (with a winform control bleh!), or Winforms in .NET using 'ProcessingMode.Remote'.
  6. You can set parameters a user can see and use to gain more flexibility.
  7. You can configure parts of a report to be used for connection strings as 'Data Sources' as well as a sql query, xml, or other datasets as a 'Dataset'. These parts and others can be stored and configured to cache data on a regular basis.
  8. You can write .NET proxy classes of the services http:// /ReportServer/ReportingService2010 or /ReportExecution2005. You can then make up your OWN methods in .NET for emailing, saving, or manipulating SSRS data from the service directly of a Server hosting SSRS reports in code.
    Programmatically Export SSRS report from sharepoint using ReportService2010.asmx

Downsides:

  1. SSRS is kind of wonkey compared to other things on getting it up fast. Most people get confused by the security policy and designing reports as an 'add on' to VS. SQL 2005 = VS BIDS 2005 , SQL 2008 = VS BIDS 2008, SQL 2012 = VS BIDS 2010(LOL).
  2. Continuing on 1 the policy for security settings IMHO are idiotically overcomplex. There is server security, database security and roles, two security settings on the page hosted for the service. Most people only set up an admin than can't get in and wonder why other users cannot. Most common complaint or question on SSRS is related to getting in generally from my experience.
  3. You can use 'expressions' that will supposeduly 'enhance' your report. Often times you do more than a few and your report goes to a crawl in performance.
  4. You have a set amount of things you can do and export to. SSRS has no hover over reporting I know of without a javascript hack.
  5. Speed and performance can take a hit as the stupid SSRS config recycles the system and a first report can take a while at times just loading the site. You can get around this by altering it but I have found making a keep alive service for it works better.

II. RDLC reports are CLIENT CONTAINED reports that are NOT HOSTED ANYWHERE. The extra c in the name means 'Client'. Generally this is an extension of the RDL language meant for use only in Visual Studio Client Applications. It exists in Visual Studio when you add a 'reporting' item.

Benefits of RDLC reports:

  1. You can hookup a wcf service much much much more easier to the dataset.
  2. You have more control over the dataset and can use POCO classes filled with Entity framework objects or ADO.NET directly as well as tables themselves. You can monkey with the data for optimization it before binding it to the report.
  3. You can customize the look more with add on's directly in code behind.

Downsides:

  1. You need to handle parameters on your own and while you can implement wrapper methods to help the legwork is a little more than expected and unfortunate.
  2. The user cannot SEE the parameters in a 'ReportViewer' control unless it is in remote mode and accessing an RLD report. Thus you need to make textboxes, dropdowns, radio buttons on your own outside the control to pass to it. Some people like this added control, I do not personally.
  3. Anything you want to do with servicing the reports for distribution you need to build yourself. Emailing, subscriptions, saving. Sorry you need to build that in .NET or else implement a proxy that already does that from above you could just be getting using hosted reports.

Honestly I like both for different purposes. If I want something to go out to analysts that they use all the time and tweak for graphs, charts, drill downs and exports to Excel I use RDL and just have SSRS's site do all the legwork of handling the email distributions. If I want an application that has a report section and I know that application is its own module with rules and governance I use an RDLC and having the parameters be smaller and be driven by the decisions the user made before getting to the report part of what client they are on and site and then they usually just choose a time frame or type and nothing more. So generally a complex report I would use RDL and for something simple I would use RDLC IMHO.

皇甫轩 2024-08-02 06:03:07

问:RDL 和 RDLC 格式有什么区别?

A: RDL 文件是由 SQL 创建的
Server 2005 版本的报告
设计师。 RDLC 文件是由
Visual Studio 2008 版本
报表设计器。

RDL 和 RDLC 格式具有相同的 XML
架构。 然而,在 RDLC 文件中,一些
值(例如查询文本)是
允许为空,这意味着
他们还没有立即准备好
发布到报表服务器。 这
缺失值可以通过以下方式输入
使用 SQL 打开 RDLC 文件
Server 2005 版本的报告
设计师。 (您必须将 .rdlc 重命名为
首先是.rdl。)

RDL 文件完全兼容
ReportViewer 控件运行时。
但是,RDL 文件不包含某些
设计时的信息
ReportViewer 控件取决于
用于自动生成
数据绑定代码。 通过手动绑定
数据,RDL 文件可用于
报表查看器控件。 新的! 也可以看看
RDL Viewer 示例程序。

请注意 ReportViewer 控件
不包含任何逻辑
连接到数据库或执行
查询。 通过分离出这样的逻辑,
ReportViewer已经制作完成
兼容所有数据源,
包括非数据库数据源。
然而,这意味着当 RDL
文件由 ReportViewer 使用
控制、SQL相关信息
RDL 文件中的内容被简单地忽略
控制。 这是主机
应用程序的责任
连接到数据库,执行查询
并向 ReportViewer 提供数据
ADO.NET形式的控件
数据表。

http://www.gotreportviewer.com/

Q: What is the difference between RDL and RDLC formats?

A: RDL files are created by the SQL
Server 2005 version of Report
Designer. RDLC files are created by
the Visual Studio 2008 version of
Report Designer.

RDL and RDLC formats have the same XML
schema. However, in RDLC files, some
values (such as query text) are
allowed to be empty, which means that
they are not immediately ready to be
published to a Report Server. The
missing values can be entered by
opening the RDLC file using the SQL
Server 2005 version of Report
Designer. (You have to rename .rdlc to
.rdl first.)

RDL files are fully compatible with
the ReportViewer control runtime.
However, RDL files do not contain some
information that the design-time of
the ReportViewer control depends on
for automatically generating
data-binding code. By manually binding
data, RDL files can be used in the
ReportViewer control. New! See also
the RDL Viewer sample program.

Note that the ReportViewer control
does not contain any logic for
connecting to databases or executing
queries. By separating out such logic,
the ReportViewer has been made
compatible with all data sources,
including non-database data sources.
However this means that when an RDL
file is used by the ReportViewer
control, the SQL related information
in the RDL file is simply ignored by
the control. It is the host
application's responsibility to
connect to databases, execute queries
and supply data to the ReportViewer
control in the form of ADO.NET
DataTables.

http://www.gotreportviewer.com/

叹梦 2024-08-02 06:03:07

我一直认为RDL和RDLC之间的区别在于RDL用于SQL Server Reporting Services,而RDLC在Visual Studio中用于客户端报告。 实现和编辑器几乎相同。 RDL 代表报告定义语言RDLC 报告定义语言客户端

我希望这有帮助。

I have always thought the different between RDL and RDLC is that RDL are used for SQL Server Reporting Services and RDLC are used in Visual Studio for client side reporting. The implemenation and editor are almost identical. RDL stands for Report Defintion Language and RDLC Report Definition Language Client-side.

I hope that helps.

红衣飘飘貌似仙 2024-08-02 06:03:07

根据我的经验,如果您需要大型报告的高性能(这确实稍微取决于您的客户端规格),请使用 rdlc。 此外,rdlc 报告使您能够对数据进行非常全面的控制,您可以通过使用客户端报告来节省自己浪费的数据库访问等。 在我目前正在进行的项目中,一份关键报告需要大约 2 分钟才能在服务器端呈现,并且几乎会删除该时间到达的任何报告服务器。 将其切换到客户端呈现,我们看到性能更接近 20-40 秒,报表服务器上没有负载,并且使用的带宽更少,因为只下载数据集。

您的情况可能会有所不同,我发现 rdlc 增加了开发和维护的复杂性,特别是当您的报告被设计为服务器端报告时。

From my experience, if you need high performance (this does depend slightly on your client specs) on large reports, go with rdlc. Additionally, rdlc reports give you a very full range of control over your data, you may be able to save yourself wasted database trips, etc. by using client side reports. On the project I'm currently working on, a critical report requires about 2 minutes to render on the server side, and pretty much takes out whichever reporting server it hits for that time. Switching it to client side rendering, we see performance much closer to 20-40 seconds with no load on the report server and less bandwidth used because only the datasets are being downloaded.

Your mileage may vary, and I find rdlc's add development and maintenance complexity, especially when your report has been designed as a server side report.

罪#恶を代价 2024-08-02 06:03:07

其中一些要点已在上面得到解决,但这里是我针对 VS2008 环境的 2 美分。

RDL(远程报告):更好的开发体验,如果您需要使用一些高级功能(如调度、临时报告等),则更具灵活性...

RDLC(本地报告):在将数据发送到报告之前更好地控制数据(在将数据发送到报告之前更容易验证或操作数据)。 部署更加容易,无需 Reporting Services 实例。

本地报告的一个巨大警告是已知的内存泄漏,如果您的客户端将运行大量大型报告,则可能会严重影响性能。 这个问题应该通过新的 VS2010 版本的报表查看器来解决。

就我而言,由于我们有一个可用的 Reporting Services 实例,因此我将新报告开发为 RDL,然后将其转换为本地报告(这很简单)并将其部署为本地报告。

Some of these points have been addressed above, but here's my 2-cents for VS2008 environment.

RDL (Remote reports): Much better development experience, more flexibility if you need to use some advanced features like scheduling, ad-hoc reporting, etc...

RDLC (Local reports): Better control over the data before sending it to the report (easier to validate or manipulate the data prior to sending it to the report). Much easier deployment, no need for an instance of Reporting Services.

One HUGE caveat with local reports is a known memory leak that can severely affect performance if your clients will be running numerous large reports. This is supposed to be addressed with the new VS2010 version of the report viewer.

In my case, since we have an instance of Reporting Services available, I develop new reports as RDLs and then convert them to local reports (which is easy) and deploy them as local reports.

波浪屿的海角声 2024-08-02 06:03:07

如果您有可用的报告服务基础设施,请使用它。 您会发现 RDL 开发变得更加愉快。 您可以预览报告、轻松设置参数等。

If you have a reporting services infrastructure available to you, use it. You will find RDL development to be a bit more pleasant. You can preview the report, easily setup parameters, etc.

李白 2024-08-02 06:03:07

虽然我目前倾向于 RDL,因为它看起来更灵活且更易于管理,但 RDLC 的优势在于它似乎简化了您的许可。 由于 RDLC 不需要 Reporting Services 实例,因此您不需要 Reporting Services 许可证即可使用它。

我不确定这是否仍然适用于较新版本的 SQL Server,但有一次,如果您选择将 SQL Server 数据库和 Reporting Services 实例放在两台单独的计算机上,则需要拥有两个单独的 SQL Server 许可证:
http://social .msdn.microsoft.com/forums/en-US/sqlgetstarted/thread/82dd5acd-9427-4f64-aea6-511f09aac406/

您可以 Bing 了解有关 Reporting Services 许可的其他类似博客和帖子。

While I currently lean toward RDL because it seems more flexible and easier to manage, RDLC has an advantage in that it seems to simplify your licensing. Because RDLC doesn’t need a Reporting Services instance, you won't need a Reporting Services License to use it.

I’m not sure if this still applies with the newer versions of SQL Server, but at one time if you chose to put the SQL Server Database and Reporting Services instances on two separate machines, you were required to have two separate SQL Server licenses:
http://social.msdn.microsoft.com/forums/en-US/sqlgetstarted/thread/82dd5acd-9427-4f64-aea6-511f09aac406/

You can Bing for other similar blogs and posts regarding Reporting Services licensing.

み青杉依旧 2024-08-02 06:03:07

对于 VS2008,我相信 RDL 为您提供比 RDLC 更好的编辑功能。 例如,我可以使用 RDL 更改文本框中选定文本量的粗体,而在 RDLC 中这是不可能的。

RDL: abcd efgh ijklmnop

RDLC: abcd efgh ijklmnop - 或 - abcd efgh ijklmnop (是你唯一的选择)

这是因为 RDLC 使用的是 2005 年的早期命名空间/格式,而 RDL 使用的是 2008。然而,这将随着 VS2010 的改变而改变

For VS2008, I believe RDL gives you better editing features than RDLC. For example, I can change the Bold on a selected amount of text in a textbox with RDL, while in RDLC it's is not possible.

RDL: abcd efgh ijklmnop

RDLC: abcd efgh ijklmnop -or- abcd efgh ijklmnop (are your only options)

This is because RDLC is using a earlier namespace/formatting from 2005, while RDL is using 2008. This however will change with VS2010

深海里的那抹蓝 2024-08-02 06:03:07

如果我们的报告数量较少,且不太复杂且由 ASP.NET 网页使用。
最好使用 rdlc,因为我们可以避免在 RS 实例上维护报告。
但我们必须手动从数据库中获取数据并将其绑定到rdlc。

缺点:与 SSrs 设计器相比,在 Visual Studio 中设计 RDLC 并不困难。

优点:维护很容易。
从我们的页面导出报告时,观察到与服务器端报告相比性能有所提高。

If we have fewer number of reports which are less complex and consumed by asp.net web pages.
It's better to go with rdlc,reason is we can avoid maintaing reports on RS instance.
but we have to fetch the data from DB manually and bind it to rdlc.

Cons:designing rdlc in visual studio is little difficult compared to SSrs designer.

Pro:Maintenance is easy.
while exporting the report from we page,observed that performance gain compared to server side reports.

幸福丶如此 2024-08-02 06:03:07

如果你想在 ASP.NET 中使用报告,那么使用 .rdl
如果您想在报表生成器/报表服务器中使用/view,则使用.rdlc
只需手动转换格式即可

if you want to use report in asp.net then use .rdl
if you want to use /view in report builder / report server then use .rdlc
just by converting format manually it works

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文