0

hello
I am trying to show Data in CrystalReport from Ms Access 2013
In button_click event

            String Cnstr = @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Users\parth\Documents\test.mdb;Jet OLEDB:DataBase Password=hello123"
            using (OleDbConnection Cn = new OleDbConnection(CnStr))
            {
                using (OleDbCommand Cmd = new OleDbCommand("select * from Table1", Cn))
                {
                    using (OleDbDataAdapter Adp = new OleDbDataAdapter(Cmd))
                    {
                        using (DataSet1 dt1 = new DataSet1())
                        {
                            Adp.Fill(dt1, "DataTable1");
                            var rc = new ReportDocument();
                            rc.Load(@"C:\Users\parth\documents\visual studio 2013\Projects\FinalTest\FinalTest\CrystalReport1.rpt");
                            rc.SetDataSource(dt1.Tables[0]);
                            crystalReportViewer1.ReportSource = rc;
                        }
                    }
                }
            }

its show error on runtime as
"Faild to load Database Information
Error in File CrystalReport1"

Pls help me out from this.
if any other way to load Data on CrystalReport so pls Tell me.

Thank you.

2
Contributors
1
Reply
11
Views
2 Years
Discussion Span
Last Post by AmrMohammed
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.