0

I have a problem when viewing a report using dataset in c# with mysql database, i create it using programmatically code. i have tried many articles in the internet but my report still not showing. is it possible creating report with report viewer using C# and MySQL?

here is my code

private void reporttest_Load(object sender, EventArgs e)
    {
        string comm = "select * from t_pejabat";
        MySqlConnection conn = new MySqlConnection(Program.konek);
        MySqlCommand comd = new MySqlCommand(comm, conn);
        conn.Open();
        DataSet1 ds = new DataSet1();
        MySqlDataAdapter da = new MySqlDataAdapter(comd);
        da.Fill(ds, "isi");
        conn.Close();


        this.reportViewer1.Reset();
        this.reportViewer1.LocalReport.DataSources.Add(new ReportDataSource("isi", ds.Tables[0]));
        this.reportViewer1.RefreshReport();
    }

here is the error picture error

4
  • 1
    Can you post you code snippet.... Commented Oct 22, 2013 at 7:55
  • Can you provide more details like type of report? Is it SSRS or Crystal Reports? Commented Oct 22, 2013 at 7:57
  • i am using data report that included in vs 2010 Commented Oct 22, 2013 at 13:21
  • Any error messages ? Without providing more details, nobody can answer your question now ... Commented Oct 22, 2013 at 17:48

1 Answer 1

1

Usually this error appear because reportViewer1.LocalReport.ReportPath is not setted.

You can do it by code or using form designer.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.