这是我在sql server中创建的视图:
CREATE VIEW [dbo].[view_CaseAttribute] AS
SELECT a.CompanyID,a.CaseID,a.CaseCD,
CaseAttribute=STUFF
(
(
SELECT ','+ CAST(b.Value AS NVARCHAR(MAX))
FROM dbo.CSAnswers b
WHERE a.CaseID=b.EntityID and a.CompanyID='3' and b.CompanyID='3' and
(b.AttributeID='POSPRODUCT' or b.AttributeID='POSMODULE' or b.AttributeID='POSFUNCTIO' or b.AttributeID='NATURE')
FOR XMl PATH('')
),1,1,''
)
FROM dbo.CRCase a
LEFT JOIN dbo.CSAnswers c ON a.CaseID=c.EntityID
WHERE a.CompanyID='3'
GROUP BY a.CompanyID,a.CaseID,a.CaseCD
GO
(图1)之后我创建了自定义项目
在报表设计器中view_CaseAttribute连接CRCase 结果:
答案 0 :(得分:0)
检查DAC代码。
你应该为字段定义正确的密钥。
样品
[PXDBString(15, IsKey = true)]