2014-10-31 173 views
2

请注意,虽然这个问题是一个完全不同的问题,它直接关系到this question.case语句

以下是返回的数据集为我的SSRS图表的脚本:

<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false" aggregate="true"> 
     <entity name="account"> 
     <attribute name="bio_employeesworldwide" alias="TotalWorldWideEmployees" aggregate="sum" /> 
     <filter> 
      <condition attribute="customertypecode" operator="eq" value="2" /> 
     </filter> 
    <link-entity name="contact" from="parentcustomerid" to="accountid" alias="contact"> 

     <attribute name="bio_webuseraccountstatus" alias="count_bio_webuseraccountstatus" aggregate="countcolumn" /> 

     <attribute name="bio_webuseraccountstatus" alias="bio_webuseraccountstatusgroupby" groupby="true" /> 

     </link-entity> 
     </entity> 
    </fetch> 

为bio_webuseraccountstatus的值可以是Active, Inactive, Disabled, Pending, etc..

在FetchXML有没有办法做一个case语句,你“不活跃”为每一个没有价值吨等于“积极”?

正如你可以看到我一直在试图解决这个问题within the reporting layer,但我遇到了很多“字符串格式”问题。

这可以用数据集图层(fetchxml)来完成吗?

+0

这是一个很好的问题! – 2015-10-15 16:57:06

回答

1

根据this Microsoft forum post

有没有同等功能的FetchXml。相反,您将需要返回每个字段值,并在调用代码中处理CASE逻辑。如果要在报告中使用此FetchXml,则可以在报告的计算字段中实现CASE逻辑。