.rdlc报告势必对象数据源的三层应用 [英] .rdlc reporting bound to Object Data Source in Three layer Application

查看:124
本文介绍了.rdlc报告势必对象数据源的三层应用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下的情况,我在asp.net应用程序中的报表层(单机)(未经网站,这意味着没有APP_ code文件夹存在),我想只是为了创建对象数据源取在一个单独的层中的对象(可以从数据访问层说的),然后使用该对象的数据源创建报表,我已经花了我整整一天周围的工作,吨工作围绕的和在网络上的文章,但不不提我真正想做的事情,任何的答案是appriciated ...

i have the following situation, i have a Reporting layer(stand alone) in asp.net application(NOT website, this means NO App_Code folder exists), and i want just to create Object Data Source to take an Object in a separate layer(lets say from Data Access Layer), and then to use that Object Data Source to create a report, i have spent my whole day working around that, tons of work around's and articles on the web, but does not mention what i really want to do, any answer is appriciated...

只是为了让事情更清楚在这里,假设以下:

just to make things more clear here, assume the following:

我与follwoing层的解决方案,

i have a solution with the follwoing layers,

  • 在UI
  • 报告(有没有员工反对)只是一个参考
  • 商业逻辑
  • 在数据访问层(雇员 - >装getEmployees()

我需要的是如上面提到的,我想从报告层,采取Employee对象从DAL创建对象数据源,然后用它的getEmployees方法被添加到 报告中,我认为它更清楚了吧,因为也报表层不具有APP_ code文件夹。

all i need is as mentioned above, i want to create Object Data Source from Reporting layer, to take Employee object from DAL, and then use it's GetEmployees method to be added to report, i think its more clear now, since also Reporting layer has NO App_Code folder.

推荐答案

的方式我一直都做的是通过创建一个有一个List类型的属性的类。我dhave一个名为LoadReport方法(PARAMS ......)在这个类中,我会打电话GetEmployess来填充我的财产。

The way Ive been doing it is by creating a class that has a property of type List. I dhave a method called LoadReport(params......) in this class where I would call GetEmployess to populate my property.

我会再添加一个新的数据集,在报表设计器,选择绑定到对象,并选择我创建的类。一旦完成了数据集将让你展开列表属性,你可以将不同的字段拖到设计师。

I would then add a new Dataset in the report designer, selecting to bind to Object, and selecting the class i created. Once finished the dataset will allow you to expand the List property where you can drag different fields onto the designer.

香港专业教育学院在VS​​2008中做到了这一点,目前正在试图在VS2010

Ive done this in VS2008, currently attempting in VS2010

这篇关于.rdlc报告势必对象数据源的三层应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆