用友U8 在销售明细表中无法按销售类型查询,使得无法查清同一部门在不同类型下的销售情况。用友U8 在销售明细表中无法按销售类型查询,使得无法查清同一部门在不同类型下的销售情况。
问题原因:因为销售明细表是自定义报表,可以在SQL语句中修改。 解决方法:在SQL语句中修改:在销售明细表中,可以点数据按钮,点SQL语句,在SELECT 后面加入:cstcode as 销售类型,全部的SQL语句如下:SELECT cstcode as 销售类型,Customer.cCusName AS 客户名称,Department.cDepName AS 部门名称,Person.cPersonName AS 业务员,SaleBillVouch.dDate AS 日期,SaleBillVouch.cSBVCode AS 发票号,Warehouse.cWhName AS 仓库名称,Inventory.cInvName AS 存货名称,Inventory.cInvStd AS 规格型号,SaleBillVouchs.iQuantity AS 数量,SaleBillVouchs.iNatTax AS 本币税额,SaleBillVouchs.iNatMoney AS 本币无税金额,SaleBillVouchs.iNatSum AS 本币价税合计,SaleBillVouchs.iNatDisCount AS 本币折扣额,convert(nvarchar(24),Salebillvouch.sbvid) as sbvid,v_aa_enum.enumName as 单据类别 FROM SaleBillVouch LEFT JOIN Person ON SaleBillVouch.cPersonCode = Person.cPersonCode LEFT JOIN Department ON SaleBillVouch.cDepCode = Department.cDepCode LEFT JOIN Customer ON SaleBillVouch.cCusCode = Customer.cCusCode INNER JOIN SaleBillVouchs ON SaleBillVouch.SBVID = SaleBillVouchs.SBVID LEFT JOIN Inventory ON SaleBillVouchs.cInvCode = Inventory.cInvcode left join WareHouse on SaleBillVouchs.cWhcode = WareHouse.cWhcode INNER JOIN v_aa_enum ON v_aa_enum.enumtype='SA.cVouchType' and Salebillvouch.cVouchType =v_aa_enum.enumcode where salebillvouch.ddate >=(select isnull(cValue,'1900-01-01') from accinformation where cSysid='Sa' and cName='dStartDate' ) and Salebillvouch.bfirst = 0 and rtrim(isnull(Salebillvouch.cInvalider ,'')) ='' 然后再次进入查询,点格式按钮,在视图中下的设置报表条件中,把销售类型加入过滤条件项中,设置时选择字符串和U8参照窗体,在参照窗体中选销售类型。
解决方案:
问题原因:因为销售明细表是自定义报表,可以在SQL语句中修改。 解决方法:在SQL语句中修改:在销售明细表中,可以点数据按钮,点SQL语句,在SELECT 后面加入:cstcode as 销售类型,全部的SQL语句如下:SELECT cstcode as 销售类型,Customer.cCusName AS 客户名称,Department.cDepName AS 部门名称,Person.cPersonName AS 业务员,SaleBillVouch.dDate AS 日期,SaleBillVouch.cSBVCode AS 发票号,Warehouse.cWhName AS 仓库名称,Inventory.cInvName AS 存货名称,Inventory.cInvStd AS 规格型号,SaleBillVouchs.iQuantity AS 数量,SaleBillVouchs.iNatTax AS 本币税额,SaleBillVouchs.iNatMoney AS 本币无税金额,SaleBillVouchs.iNatSum AS 本币价税合计,SaleBillVouchs.iNatDisCount AS 本币折扣额,convert(nvarchar(24),Salebillvouch.sbvid) as sbvid,v_aa_enum.enumName as 单据类别 FROM SaleBillVouch LEFT JOIN Person ON SaleBillVouch.cPersonCode = Person.cPersonCode LEFT JOIN Department ON SaleBillVouch.cDepCode = Department.cDepCode LEFT JOIN Customer ON SaleBillVouch.cCusCode = Customer.cCusCode INNER JOIN SaleBillVouchs ON SaleBillVouch.SBVID = SaleBillVouchs.SBVID LEFT JOIN Inventory ON SaleBillVouchs.cInvCode = Inventory.cInvcode left join WareHouse on SaleBillVouchs.cWhcode = WareHouse.cWhcode INNER JOIN v_aa_enum ON v_aa_enum.enumtype='SA.cVouchType' and Salebillvouch.cVouchType =v_aa_enum.enumcode where salebillvouch.ddate >=(select isnull(cValue,'1900-01-01') from accinformation where cSysid='Sa' and cName='dStartDate' ) and Salebillvouch.bfirst = 0 and rtrim(isnull(Salebillvouch.cInvalider ,'')) ='' 然后再次进入查询,点格式按钮,在视图中下的设置报表条件中,把销售类型加入过滤条件项中,设置时选择字符串和U8参照窗体,在参照窗体中选销售类型。
www.kuaiji66.com 天龙瑞德