Ejemplo n.º 1
0
        private void ReportFromDBTable()
        {
            CRCategory report = new CRCategory();

            report.DataSourceConnections.Clear();
            report.Database.Tables["Category"].SetDataSource(GetCategoryTable());
            CRV.ReportSource = report;
        }
Ejemplo n.º 2
0
        public void ReportFromStaticData()
        {
            DataTable dt = new DataTable();

            dt.Columns.Add("id", typeof(int));
            dt.Columns.Add("name", typeof(string));
            dt.Rows.Add(2, "category 1");
            CRCategory report = new CRCategory();

            report.Database.Tables["Category"].SetDataSource(dt);
            CRV.ReportSource = null;
            CRV.ReportSource = report;
        }