【发布时间】:2018-04-05 15:13:00
【问题描述】:
我正在构建一个带有 3 个 Tablix 的 SSRS 报告,我只想用 1 个数据集填充,每个 tablix 必须向我显示不同的数据(显然),但问题是在其中 2 个上我需要使用相对设置数据时间,而不是日期,现在我为每个 tablix 设置一个 DataSet,每个数据集都使用 FetchXml 进行查询。
这是一个例子:
表2数据集过滤查询
<?xml version="1.0"?>
<fetch distinct="true" mapping="logical" output-format="xml-platform" version="1.0">
<entity name="Entity1">
<attribute name="Att1"/>
<attribute name="createdon"/>
<attribute name="modifiedon"/>
<order descending="false" attribute="Att1"/>
<filter type="and">
<condition attribute="modifiedon" value="7" operator="olderthan-x-days"/>
<condition attribute="modifiedon" *value="14" operator="last-x-days"*/>
</filter>
<link-entity name="Entity2" alias="DataTab1" to="Att1" from="Entity1">
<attribute name="Att2_DataTab1"/>
<attribute name="createdon"/>
<filter type="and">
<condition attribute="createdon" value="14" operator="last-x-days"/>
</filter>
</link-entity>
</entity>
和表3数据集过滤查询
<?xml version="1.0"?>
<fetch distinct="true" mapping="logical" output-format="xml-platform" version="1.0">
<entity name="Entity1">
<attribute name="Att1"/>
<attribute name="createdon"/>
<attribute name="modifiedon"/>
<order descending="false" attribute="Att1"/>
<filter type="and">
<condition attribute="modifiedon" value="7" operator="last-x-days"/>
</filter>
<link-entity name="Entity2" alias="DataTab1" to="Att1" from="Entity1">
<attribute name="Att2_DataTab1"/>
<attribute name="createdon"/>
<filter type="and">
<condition attribute="createdon" value="7" operator="last-x-days"/>
</filter>
</link-entity>
</entity>
由于我使用相同的信息,并且我唯一需要更改的是每个 Tablix 上的过滤结构,我如何将 FetchXML 过滤条件添加到 Tablix 属性过滤器?
感谢您提供任何线索:)
【问题讨论】:
标签: reporting-services ssrs-tablix fetchxml