请注意,尽管这个问题是一个完全不同的问题,但它与这个问题。直接相关。
下面是返回我的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..
In FetchXML是否有一种方法可以对不等于"Active“的每个值执行"InActive”语句?
正如您所看到的,我一直试图解决这个问题,在报告层内,但正在经历许多“字符串格式”问题。
可以用dataset层(fetchxml)来代替吗?
发布于 2015-10-20 20:54:08
根据这个微软论坛帖子
在FetchXml中没有等效的函数。相反,您需要返回每个字段值,并在调用代码中处理CASE逻辑。如果要在报表中使用此FetchXml,则可以在报表上的计算字段中实现CASE逻辑。
发布于 2020-05-30 18:14:23
您始终可以在返回时解析fetchxml的输出。因此,您可以检查状态(0或1),并重写状态,并将新变量添加到输出中,而不是按到isreceivetravelalerts的原始记录字段--屏幕、报表或db。笨重但有用。
if ($record->isreceivetravelalerts == 1)
{
$travel_alerts = "Active";
}
$travel_alerts = "Inactive";https://stackoverflow.com/questions/26678688
复制相似问题