Example #1
0
        private static void AddDataSets(Report report, Modeling.Report repdef)
        {
            var dataset = new XDataSet();

            report.DataSets.Add(dataset);
            dataset.Name           = repdef.DatasetName;
            dataset.CommandText    = "";
            dataset.DataSourceName = repdef.DatasetName;

            for (int colindex = 0; colindex < repdef.DataTable.Columns.Count; colindex++)
            {
                var dt_col = repdef.DataTable.Columns[colindex];

                var field = new Field();
                field.Name      = dt_col.ColumnName;
                field.DataField = dt_col.ColumnName;
                dataset.Fields.Add(field);
            }
        }
Example #2
0
        private static void AddDataSets(Report report, Modeling.Report repdef)
        {
            var dataset = new XDataSet();

            report.DataSets.Add(dataset);
            dataset.Name = repdef.DatasetName;
            dataset.CommandText = "";
            dataset.DataSourceName = repdef.DatasetName;

            for (int colindex = 0; colindex < repdef.DataTable.Columns.Count; colindex++)
            {
                var dt_col = repdef.DataTable.Columns[colindex];

                var field = new Field();
                field.Name = dt_col.ColumnName;
                field.DataField = dt_col.ColumnName;
                dataset.Fields.Add(field);
            }
        }