Tag: reportviewer

发布RDLC文件

我的WPF应用程序中有一些RDLC文件。 当我发布项目时,报告文件不会被发布,当我尝试使用客户端访问它们时,我会收到错误消息,说明找不到它们。 我已经检查了发布文件夹,事实上,它们并不存在。 我使用以下代码调用RDLC文件: Microsoft.Reporting.WinForms.ReportViewer rvReportViewer; /* … */ rvReportViewer.LocalReport.ReportPath = string.Format(“Reports/{0}.rdlc”, ReportName); 我已经尝试将这些构建操作设置为“资源”,这是我对我的静态图像文件所拥有的,但这似乎没有任何区别。 为什么不将报告复制到发布目录? 有没有办法强迫这种情况发生,或者我应该以其他方式访问它们? 谢谢!

数据表作为ReportViewer中的数据源

我希望reportviewer控件中的表组件可以使用来自datatable的数据填充。 换句话说,我想使用数据表作为reportviewer控件的源。 我尝试创建数据集,添加了数据表,其中包含我的数据表在编程后填充的精确列。然后我使用了以下代码: DataTable dt = new DataTable(); dt.TableName = “DataTable1”; conn.Open(); adapter.Fill(dt); ReportViewer1.ProcessingMode=ProcessingMode.Local; ReportDataSource source = new ReportDataSource(“SampleDs”, dt); ReportViewer1.LocalReport.DataSources.Clear(); ReportViewer1.LocalReport.DataSources.Add(source); ReportViewer1.DataBind(); ReportViewer1.LocalReport.Refresh(); 但是,这不起作用。 我得到的唯一信息是: 报告处理期间发生错误。 SampleDs。 任何人都可以告诉我如何解决问题或指出创建此类报告的完整过程描述的参考,

从DataGridView在运行时动态创建RDLC报告

我有一个表单AdvancedSearchForm与DataGridView控件dgrData和一个按钮Report在C#Winform。 单击按钮Report ,我希望带有ReportView控件的表单显示与DataGridView中具有相同列标题的列相同的列。 使用DataGridView和Button进行表单 单击按钮“报告”时预期的输出: 我的DatagridView ( dgrData )控件与 SQL “Select Id, c_Name from Country” 的ConnectionString server=localhost;User Id=root;password=root;Persist Security Info=True;database=country_state 要在运行时将数据加载到网格,我准备以下DataAdapter : DataAdapter dataAdapter = DataAdapter.Current; // I am passing the SQL statement and the table name to my database which knows the ConnectionString within the LoadData function DataTable dt0 = dataAdapter.LoadData(“select Id, c_Name from […]

如何将数据表加载为ReportDataSource?

我想做的事情如下: this.reportViewer.LocalReport.DataSources.Clear(); DataTable dt = new DataTable(); dt = this.inputValuesTableAdapter.GetData(); Microsoft.Reporting.WinForms.ReportDataSource rprtDTSource = new Microsoft.Reporting.WinForms.ReportDataSource(); rprtDTSource = dt; // this line generates exception //this.reportViewer.LocalReport.DataSources.Add(rprtDTSource); this.reportViewer.RefreshReport(); 如何将数据表加载为ReportDataSource? 当前代码生成: “无法将类型’System.Data.DataTable’隐式转换为’Microsoft.Reporting.WinForms.ReportDataSource’”

ReportViewer IE 11

我的3.5框架webforms网站上有一个显示报告的页面。 它使用报告查看器10.0.0.0。 除了IE11之外,每个浏览器的报告都会呈现。 只有以doc类型格式显示信息的报表呈现为html表并存储在.rdl文件中。 param框加载但是当选择并运行报告时,我只是获取加载gif并且它超时。 我已经尝试使用IE11开发工具进行故障排除,并且在打开它时超时,这是一个完美的风暴。 另一点信息我在VS2012本地运行网站,在IE11中它只是在IIS7服务器上呈现。 我已经尝试了一个自定义.browser文件来模拟IE10没有运气。 任何帮助都会受到影响,或者只是知道我不是唯一的帮助 。 更新:我在服务器日志中发现了exception。 HttpHandlerInputException,缺少URL参数:IterationId。 提前致谢。