解决方案: |
1、在“基础档案/其它/自定义项”中为存货增加颜色的自由项,如把自由项1设置为对应颜色属性;2、在“销售订货统计表”操作界面点击“数据”进行自定义报表;3、在“自定义报表”操作界面,点击“SQL”按钮打开SQL语句,修改SQL语句,增加显示“销售订单子表”中对应颜色属性的自由项,点击“执行SQL语句“按钮,保存即可。例:未增加前的SQL语句:SELECT SO_SOMain.cSOCode AS 销售订单号,SO_SOMain.dDate AS 受订日期,SO_SOMain.cMaker AS 制单人,SO_SODetails.iQuantity AS 数量,SO_SODetails.iNatMoney AS 本币无税金额,SO_SODetails.iNatTax AS 本币税额,SO_SODetails.iNatSum AS 本币价税合计,SO_SODetails.iNatDisCount AS 本币折扣额,Department.cDepName AS 部门名称,Customer.cCusName AS 客户名称,Person.cPersonName AS 业务员,v_aa_enum.enumname AS 业务类型 ,SO_SODetails.cSCloser as 行关闭人 FROM SO_SOMain INNER JOIN SO_SODetails ON SO_SOMain.cSOCode = SO_SODetails.cSOCode LEFT JOIN Department ON SO_SOMain.cDepCode = Department.cDepCode LEFT JOIN Customer ON SO_SOMain.cCusCode = Customer.cCusCode LEFT JOIN Person ON SO_SOMain.cPersonCode = Person.cPersonCode LEFT JOIN Inventory ON SO_SODetails.cInvCode = Inventory.cInvCode left join v_aa_enum on SO_SOMain.cBusType=v_aa_enum.enumcode and v_aa_enum.enumtype='SA.cBustype'。 增加后的SQL语句:SELECT SO_SOMain.cSOCode AS 销售订单号,SO_SOMain.dDate AS 受订日期,SO_SOMain.cMaker AS 制单人,SO_SODetails.iQuantity AS 数量,SO_SODetails.iNatMoney AS 本币无税金额,SO_SODetails.iNatTax AS 本币税额,SO_SODetails.iNatSum AS 本币价税合计,SO_SODetails.iNatDisCount AS 本币折扣额,Department.cDepName AS 部门名称,Customer.cCusName AS 客户名称,Person.cPersonName AS 业务员,v_aa_enum.enumname AS 业务类型 ,SO_SODetails.cSCloser as 行关闭人,SO_SODetails.cFree1 AS 颜色 FROM SO_SOMain INNER JOIN SO_SODetails ON SO_SOMain.cSOCode = SO_SODetails.cSOCode LEFT JOIN Department ON SO_SOMain.cDepCode = Department.cDepCode LEFT JOIN Customer ON SO_SOMain.cCusCode = Customer.cCusCode LEFT JOIN Person ON SO_SOMain.cPersonCode = Person.cPersonCode LEFT JOIN Inventory ON SO_SODetails.cInvCode = Inventory.cInvCode left join v_aa_enum on SO_SOMain.cBusType=v_aa_enum.enumcode and v_aa_enum.enumtype='SA.cBustype' 。 |