Click here to Skip to main content
14,866,281 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have created a winform data entry connected to .accdb as source The entry part is done, and i have given a button to open another which must contain the summary of the data in table & in graph format.

I have created the table successfully in "Report1.rdlc" and used it in my form2 using report viewer.

I have created another report"report2.rdlc" and when i used it in my form2 using report viewer the below error is coming:

A data source instance has not been supplied for the data source 'Dataset1'

A data source instance has not been supplied for the data source 'Dataset1'


What I have tried:

and here is the code for form load event
C#
namespace WindowsFormsApp1
{
    public partial class MS_Dies_Report : Form
    {
        public MS_Dies_Report()
        {
            InitializeComponent();
        }

        private void MS_Dies_Report_Load(object sender, EventArgs e)
        {
            // TODO: This line of code loads data into the 'TrialDataSet.MSdies' table. You can move, or remove it, as needed.
            this.MSdiesTableAdapter.Fill(this.TrialDataSet.MSdies);

            this.reportViewer1.RefreshReport();
            this.reportViewer2.RefreshReport();
        }
    }
}
Posted
Updated 29-Jul-20 23:06pm

1 solution

As with this question you posted: Binding source update error after updating the databse accdb[^], you need to check the spelling of your variable references.
   
Comments
Member 14898617 30-Jul-20 5:13am
   
Hi thank you for your reply ..this has nothing to do with the variable names because i corrected them already ..the solution i want is to know how to create two reports using same data set & that too one table & graph & show them in two report viewers of same form
Richard MacCutchan 30-Jul-20 5:43am
   
Look at the error message, it is clearly telling you what is wrong. That is the issue that you need to correct.

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




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900