public static InqDefineSource Get_InqDefineSource(int top) { var iqr = new InqDefineSource("abc"); iqr.AddTblName("DimItem", "DimItemGroup", "DimSalePerson", "FACTSAR"); // Select iqr.AddField("FACTSAR", "CardCode"); iqr.AddField("FACTSAR", "ItemCode"); iqr.AddField("FACTSAR", "SlpCode"); iqr.AddField("DimItem", "ItemName"); iqr.AddField("DimItem", "ItmsGrpCod"); iqr.AddField("DimItemGroup", "ItmsGrpNam"); iqr.AddField("DimSalePerson", "SlpName"); // Summary iqr.AddSummary("FACTSAR", "Quantity", "SUM"); iqr.AddSummary("FACTSAR", "VatSum", "SUM"); // Filter iqr.AddFilter(new InqFieldInfo("FACTSAR", "ItemCode", "NTEXT"), ">=", "2X3RT4-BLACK"); iqr.AddFilter(new InqFieldInfo("FACTSAR", "ItemCode", "NTEXT"), "<=", "DD2-1G-800-NB"); iqr.AddFilter(iqr.Summaries[0], ">=", "0"); //// Order By //iqr.AddOrder("FACTSAR", "VatSum_Sum", "DESC"); //iqr.AddOrder("FACTSAR", "Quantity_Sum", "DESC"); return(iqr); }
public static InqDefineSource Get_InqDefineSource1(int top) { var iqr = new InqDefineSource("bcd"); // Select iqr.AddField("FACTSAR", "CardCode"); iqr.AddField("FACTSAR", "ItemCode"); iqr.AddField("FACTSAR", "SlpCode"); iqr.AddField("DimItem", "ItemName"); iqr.AddField("DimItem", "ItmsGrpCod"); iqr.AddField("DimItemGroup", "ItmsGrpNam"); iqr.AddField("DimSalePerson", "SlpName"); // Summary //iqr.AddSummary("FACTSAR", "Quantity", "SUM"); //iqr.AddSummary("FACTSAR", "VatSum", "SUM"); // Filter iqr.AddFilter(new InqFieldInfo("FACTSAR", "ItemCode", "NTEXT"), ">=", "2X3RT4-BLACK"); iqr.AddFilter(new InqFieldInfo("FACTSAR", "ItemCode", "NTEXT"), "<=", "DD2-1G-800-NB"); //iqr.AddFilter(iqr.Summaries[0], ">=", "0"); foreach (var item in iqr.Fields) { item.OrderName = "ASC"; } foreach (var item in iqr.Summaries) { item.Field.OrderName = "DESC"; } return(iqr); }
public static InqDefineSource Get_InqDefineSource(int top) { var iqr = new InqDefineSource("abc"); iqr.AddTblName("DimItem", "DimItemGroup", "DimSalePerson", "FACTSAR"); // Select iqr.AddField("FACTSAR", "CardCode"); iqr.AddField("FACTSAR", "ItemCode"); iqr.AddField("FACTSAR", "SlpCode"); iqr.AddField("DimItem", "ItemName"); iqr.AddField("DimItem", "ItmsGrpCod"); iqr.AddField("DimItemGroup", "ItmsGrpNam"); iqr.AddField("DimSalePerson", "SlpName"); // Summary iqr.AddSummary("FACTSAR", "Quantity", "SUM"); iqr.AddSummary("FACTSAR", "VatSum", "SUM"); // Filter iqr.AddFilter(new InqFieldInfo("FACTSAR", "ItemCode", "NTEXT"), ">=", "2X3RT4-BLACK"); iqr.AddFilter(new InqFieldInfo("FACTSAR", "ItemCode", "NTEXT"), "<=", "DD2-1G-800-NB"); iqr.AddFilter(iqr.Summaries[0], ">=", "0"); //// Order By //iqr.AddOrder("FACTSAR", "VatSum_Sum", "DESC"); //iqr.AddOrder("FACTSAR", "Quantity_Sum", "DESC"); return iqr; }
public static InqDefineSource Get_InqDefineSource1(int top) { var iqr = new InqDefineSource("bcd"); // Select iqr.AddField("FACTSAR", "CardCode"); iqr.AddField("FACTSAR", "ItemCode"); iqr.AddField("FACTSAR", "SlpCode"); iqr.AddField("DimItem", "ItemName"); iqr.AddField("DimItem", "ItmsGrpCod"); iqr.AddField("DimItemGroup", "ItmsGrpNam"); iqr.AddField("DimSalePerson", "SlpName"); // Summary //iqr.AddSummary("FACTSAR", "Quantity", "SUM"); //iqr.AddSummary("FACTSAR", "VatSum", "SUM"); // Filter iqr.AddFilter(new InqFieldInfo("FACTSAR", "ItemCode", "NTEXT"), ">=", "2X3RT4-BLACK"); iqr.AddFilter(new InqFieldInfo("FACTSAR", "ItemCode", "NTEXT"), "<=", "DD2-1G-800-NB"); //iqr.AddFilter(iqr.Summaries[0], ">=", "0"); foreach (var item in iqr.Fields) { item.OrderName = "ASC"; } foreach (var item in iqr.Summaries) { item.Field.OrderName = "DESC"; } return iqr; }