MsSqlConnectionParameters ms = new MsSqlConnectionParameters(); ms.AuthorizationType = MsSqlAuthorizationType.SqlServer; ms.Password = "**"; ms.UserName = "sa"; ms.ServerName = "localhost"; ms.DatabaseName = "**"; // ms.AuthorizationType = MsSqlAuthorizationType.SqlServer; DashboardSqlDataSource sqlDataSource1 = new DashboardSqlDataSource("SQL Data Source 1", ms); TableQuery tableQuery1 = new TableQuery("Query 1"); tableQuery1.AddTable("dyhjjzb【视图】").SelectColumns("xmdm", "hzsl", "xmlx", "zyh"); sqlDataSource1.Queries.Add(tableQuery1); sqlDataSource1.Fill(); dashboardDesigner1.Dashboard.DataSources.Add(sqlDataSource1);
时间: 2024-10-25 16:48:43