我想在主行中显示SOShipline.QTY,并在其工作线下以直线显示每个SOShiplineSplit.QTY,而不是以行显示。
The report display now and the change I want
感谢任何想提及Tabular Sub-report Property的人 是的,我已经尝试过表格报告,但是遇到了我几天都无法解决的问题。我在另一个帖子中发布了我的问题 Acumatica:Tabular Report generates unexpected lines when calling as sub report
仅对于这个问题,有人可以为我指出实现我的需求的方法吗?
答案 0 :(得分:0)
SQL视图,但是在这种情况下,您可能需要创建一个。下面的select语句将为您提供所需的一行输出。然后,您将根据视图创建DAC。从那里您可以将视图添加到报告中。
-- ------------------------------------------------------------
-- View: usrSOSplit
-- ------------------------------------------------------------
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[usrSOSplit]') and OBJECTPROPERTY(id, N'IsView') = 1)
drop view [dbo].usrSOSplit
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
Create View [usrSOSplit] as
SELECT companyid, shipmentnbr,
isnull(cast([1] as varchar(50)),'')
+' '+ isnull(cast([2] as varchar(50)),'')
+' '+ isnull(cast([3] as varchar(50)),'')
+' '+ isnull(cast([4] as varchar(50)),'')
+' '+ isnull(cast([5] as varchar(50)),'')
+' '+ isnull(cast([6] as varchar(50)),'')
+' '+ isnull(cast([7] as varchar(50)),'')
+' '+ isnull(cast([8] as varchar(50)),'')
+' '+ isnull(cast([9] as varchar(50)),'')
+' '+ isnull(cast([10] as varchar(50)),'')
as ListOfQty
FROM
( SELECT shipmentnbr,companyid, splitlinenbr as splitLine , qty FROM SOShipLineSplit ) p
PIVOT ( max(qty) FOR [splitline] IN ( [1],[2],[3],[4],[5],[6],[7],[8],[9],[10] ) ) AS pvt
DAC:
using System;
using PX.Data;
namespace SoShipSplit
{
[Serializable]
public class usrSOSplit : IBqlTable
{
#region Shipmentnbr
[PXDBString(15, IsUnicode = true, InputMask = "")]
[PXUIField(DisplayName = "Shipmentnbr")]
public virtual string Shipmentnbr { get; set; }
public abstract class shipmentnbr : IBqlField { }
#endregion
#region ListOfQty
[PXDBString(509, InputMask = "")]
[PXUIField(DisplayName = "List Of Qty")]
public virtual string ListOfQty { get; set; }
public abstract class listOfQty : IBqlField { }
#endregion
}
}