我试图限制DevExpress仪表板查询生成器中显示的表。 我尝试添加如下查询,但是查询生成器仍显示数据库中的所有表。
是否可以限制查询生成器中显示的表?
DataSourceInMemoryStorage dataSourceStorage = new DataSourceInMemoryStorage();
DashboardSqlDataSource sqlDataSource = new DashboardSqlDataSource("MyApp", customstringParams);
SelectQuery selectQuery = SelectQueryFluentBuilder
.AddTable("EMPLOYEE_DETAIL", "Employee Master")
.SelectAllColumns()
.Build("Employee Information");
sqlDataSource.Queries.Add(selectQuery);
SelectQuery selectQuery2 = SelectQueryFluentBuilder
.AddTable("EMPLOYEE_ATTENDANCE", "Shift Distribution")
.SelectAllColumns()
.Build("Shift Distribution");
sqlDataSource.Queries.Add(selectQuery2);
sqlDataSource.Fill();
dataSourceStorage.RegisterDataSource("sqlDataSource", sqlDataSource.SaveToXml());
DashboardConfigurator.Default.SetDataSourceStorage(dataSourceStorage);
答案 0 :(得分:1)