C#窗口应用程序中的RDLC报告图表 [英] RDLC Report Chart in C# window application

查看:116
本文介绍了C#窗口应用程序中的RDLC报告图表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很多次尝试将数据集绑定到RDLC报告,..在我的仪表板中有三个报表查看器,每个都有一个报表1,2,3等,..发票,销售和报价



发票只能绑定并获得输出,但仍然有两个报告得到错误=数据库实例没有提供数据源'dataset1'





i am tried lot of times to bind the dataset to RDLC Report ,.. in my dashboard having three Report viewer and each have one report1,2,3 etc ,.. invoice ,salesorderand quote

invoice only bind and get output but remain two reports getting error ="database instance has not be supplied for the datasource 'dataset1'"


dsreportinvoice.Tables.Add(objservice.WBdownloadTransorder("N", "I", "BB"));
dsreportsalesorder.Tables.Add(objservice.WBdownloadTransorder("N", "S", "BB"));
dsreportquote.Tables.Add(objservice.WBdownloadTransorder("N", "4", "BB"));
DataSet ds = objCustomerDetailsBAL.GetSPCodeBAL();

CMBSO.DataSource = ds.Tables[0];
CMBSO.DisplayMember = "EmployeeCode";


CMBINV.DataSource = ds.Tables[0];
CMBINV.DisplayMember = "EmployeeCode";


CMBQ.DataSource = ds.Tables[0];
CMBQ.DisplayMember = "EmployeeCode";

string reportPathinvoice = @"D:\WORKING_FOLDER\ISELLIT\ISELLIT\Report1.rdlc";
string reportPathSalesOrder = @"D:\WORKING_FOLDER\ISELLIT\ISELLIT\Report2.rdlc";
string reportPathQuote = @"D:\WORKING_FOLDER\ISELLIT\ISELLIT\Report3.rdlc";

RPTVinvoice.LocalReport.DataSources.Add(new ReportDataSource("Invoiceorder", dsreportinvoice.Tables[0]));
RPTVinvoice.LocalReport.ReportPath = reportPathinvoice;
this.RPTVinvoice.RefreshReport();

RPTVsalesorder.LocalReport.DataSources.Clear();
RPTVsalesorder.LocalReport.DataSources.Add(new ReportDataSource("Invoiceorder", dsreportsalesorder.Tables[0]));
RPTVsalesorder.LocalReport.ReportPath = reportPathSalesOrder;
this.RPTVsalesorder.RefreshReport();

RPTVQuote.LocalReport.DataSources.Clear();
RPTVQuote.LocalReport.DataSources.Add(new ReportDataSource("Invoiceorder", dsreportquote.Tables[0]));
RPTVQuote.LocalReport.ReportPath = reportPathQuote;
this.RPTVQuote.RefreshReport();

推荐答案

您好,



我看到了RPTV发票你没有做任何明确的数据源。如果你第一次清除数据源,它仍然有效吗?



我认为在设计时某些东西不能像你向项目中添加一个DataSource和没有数据的报告已清除的源正在使用设计时数据源。
Hello,

I see that for RPTVinvoice you don't do any clear of datasources. It is still working if you first clear the datasources?

I think something at design time is not working well like you add to your project a DataSource and the report without data sources cleared is working with the design time datasource.


这篇关于C#窗口应用程序中的RDLC报告图表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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