尽管表格中有数据,报告仍无法正常工作

编程入门 行业动态 更新时间:2024-10-15 08:26:30
本文介绍了尽管表格中有数据,报告仍无法正常工作 - 请更正代码 - ReportView的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

亲爱的期待, 我已经生成了一张桌子上的记录。 我已经在表格上放了一份报告附上报告。 然而数据还没有出来。 请通过更正代码来协助下面

Dear expect , I have generated records which are in a table. I have placed a reportview on a form with the report attached. However the data is just not coming out. Please assist by correcting the codes below

string str; str = ConfigurationManager.ConnectionStrings["ApplicationServices"].ConnectionString; SqlConnection sqlCon = new SqlConnection(str); sqlCon.Open(); SqlDataAdapter daa = new SqlDataAdapter("select * from SCHEDULE", sqlCon); DataSet dsasa = new DataSet(); daa.Fill(dsasa, "SCHEDULE"); ReportViewer1.Visible = true; ReportViewer1.Reset(); ReportViewer1.LocalReport.Refresh(); ReportViewer1.Reset();

推荐答案

Microsoft.Reporting.WebForms.ReportDataSource[] RSArray = new Microsoft.Reporting.WebForms.ReportDataSource[1]; ReportViewer1.Visible = true; ReportViewer1.LocalReport.DataSources.Clear(); ReportViewer1.LocalReport.DataSources.Add(new ReportDataSource("dsRatingReport", dsRatingReport.Tables(0))); ReportViewer1.LocalReport.Refresh();

更多推荐

尽管表格中有数据,报告仍无法正常工作

本文发布于:2023-11-07 23:20:16,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1567705.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:中有   无法正常   表格   报告   数据

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!