简体   繁体   English

Visual Studio 2010报表查看器

[英]Visual Studio 2010 Report Viewer

I have been trying to use report viewer for a couple of days now and got no where. 我已经尝试使用报表查看器两天了,却无处可去。 I have an ASP.Net WEB APLICATION, not a WEB SITE. 我有一个ASP.Net Web APLICATION,而不是一个Web站点。 Which every tutorial relates to. 每个教程都与之相关。

I used the report viewer last week in another project and it worked perfectly. 上周,我在另一个项目中使用了报表查看器,它运行良好。

What im trying to achive is to create a new report using business objects. 我试图达到的目标是使用业务对象创建新报表。 NOT a SQL connection. 不是SQL连接。 Previously when i used the report viewer when adding new DataSet to the Report Data window all of my namespaces in my objects library (a seperate assembly) were listed and I was able to select my busines object and drag the fields to the report. 以前,当我在将新数据集添加到“报告数据”窗口时使用报告查看器时,列出了我的对象库(单独的程序集)中的所有名称空间,并且能够选择我的业务对象并将字段拖到报告中。

Now every time I go into the add dataset wizard there is nothing in the datasource list. 现在,每次进入添加数据集向导时,数据源列表中都没有任何内容。 If I add the report to the objects library and create an object datasource then they appear in here fine. 如果我将报表添加到对象库并创建对象数据源,则它们会很好地出现在这里。 Obviously i dont want reports in the objects library, they go in the website. 显然我不希望在对象库中生成报告,它们会进入网站。

Does anyone know why the add new datasource option is disabled for Web applications? 有谁知道为什么对Web应用程序禁用添加新数据源选项? (Accessed from Data > Add new datasource) (从“数据”>“添加新数据源”访问)

Can anyone tell me how I can use the object datasource in the designer in the report? 谁能在报告中告诉我如何使用设计器中的对象数据源?

my classes i want to report on have both a parameterless constructor, they return a list for the get methods. 我要报告的类都具有无参数构造函数,它们返回get方法的列表。 and they are all serializable. 它们都是可序列化的。

I have found a solution for this by creating a reporting class library. 我已经通过创建报告类库找到了解决方案。

if anyone is interested I added it to my blog for future reference. 如果有人感兴趣,我将其添加到我的博客中以供将来参考。

http://wraithnath.blogspot.com/2011/02/visual-studio-2010-report-viewer-object.html http://wraithnath.blogspot.com/2011/02/visual-studio-2010-report-viewer-object.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在报表查看器中定义主体尺寸? (视觉工作室 2010) - How to define Body Size in Report Viewer ? (Visual studio 2010) Visual Studio 2010,本地SSRS报表查看器14,预览为空,但导出和打印工作正常 - Visual Studio 2010, Local SSRS Report Viewer 14, Preview is empty, but Export and Print work fine 可以在Visual Studio 2008中使用Report Viewer 2010控件吗? - Can Report Viewer 2010 control be used in Visual studio 2008 without problems? 发布到服务器Visual Studio 2010时,Crystal报表查看器无法显示 - Crystal report viewer is not able to display when publish to server visual studio 2010 Visual Studio 中的报告查看器配置错误 - Report Viewer Configuration Error in Visual Studio 无法使用报表查看器 Visual Studio 2008 加载报表 - Cannot load Report using Report Viewer Visual Studio 2008 Visual Studio 2015 - Report Viewer 2015可再发行 - 使报表查看器“12”正常工作 - Visual Studio 2015 - Report Viewer 2015 redistributable - Getting Report Viewer “12” working Visual Studio 2015中的报表查看器未在asp.net中的窗体上下降 - report viewer in visual studio 2015 is not drop on form in asp.net Visual Studio报表查看器无法连接到远程SSRS服务器 - Visual Studio Report Viewer does not connect to remote SSRS server 如何使用Visual Studio报表查看器显示报表服务报表 - how to use visual studio report viewer to show reporting service reports
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM