Click here to Skip to main content
11,417,390 members (52,100 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: C#3.0
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;
            RPTVsalesorder.LocalReport.DataSources.Add(new ReportDataSource("Invoiceorder", dsreportsalesorder.Tables[0]));
            RPTVsalesorder.LocalReport.ReportPath = reportPathSalesOrder;
            RPTVQuote.LocalReport.DataSources.Add(new ReportDataSource("Invoiceorder", dsreportquote.Tables[0]));
            RPTVQuote.LocalReport.ReportPath = reportPathQuote;
Posted 28-May-13 20:50pm
Edited 18-Jul-13 8:09am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1


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.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sascha Lefévre 340
1 Abhinav S 303
2 OriginalGriff 235
3 Sergey Alexandrovich Kryukov 215
4 Richard Deeming 125
0 Sergey Alexandrovich Kryukov 9,345
1 OriginalGriff 7,712
2 Maciej Los 3,758
3 Abhinav S 3,601
4 Sascha Lefévre 3,198

Advertise | Privacy | Mobile
Web02 | 2.8.150427.4 | Last Updated 18 Jul 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100