public ReportConfiguration InitReportConfiguration(String Index) { ReportConfiguration ReportConfiguration = new ReportConfiguration(); StringBuilder Sql_Select = new StringBuilder(); //增加查询条件 Scdel=0 2013-10-17 Sql_Select.Append("Select ID,CatlogCode,Description,SheetStyle,DataSources From sys_biz_ReportSheet Where Scdel=0 and ID ='"); Sql_Select.Append(Index); Sql_Select.Append("'"); DataTable Data = GetDataTable(Sql_Select.ToString()); if (Data != null && Data.Rows.Count > 0) { DataRow Row = Data.Rows[0]; ReportConfiguration.Index = Row["ID"].ToString(); ReportConfiguration.Code = Row["CatlogCode"].ToString(); ReportConfiguration.Description = Row["Description"].ToString(); ReportConfiguration.SheetStyle = Row["SheetStyle"].ToString(); TableDataCollection Sources = BinarySerializer.Deserialize(Row["DataSources"].ToString()) as TableDataCollection; if (Sources != null) { foreach (TableData Source in Sources) { ReportConfiguration.DataSources.Add(Source); } } ReportConfiguration.ReportParameters = ReportParameterManager.getReportParameters(ReportConfiguration.Index); } return(ReportConfiguration); }
public DataSourceManager(TableDataCollection dataSourceInfo, Hashtable parameterList) { this.dataSourceInfo = dataSourceInfo; this.parameterList = parameterList; }