简体   繁体   English

如何使用查询过滤SSRS中的数据?

[英]How to use query to filter data in SSRS?

If transaction came from APV, the only columns with amounts are Accounts Payable Trade, Accrued EWT, CIB and Peso will have data. 如果交易来自APV,则只有金额的列是应付帐款贸易,应计EWT,CIB和Peso将具有数据。

If transaction is direct to DV (without APV), the columns with amount are Accrued EWT, CIB, Peso, Summary, Input Tax Checking and Total EWT 如果交易直接发送给DV(无APV),则带有金额的列为应计EWT,CIB,比索,汇总,进项税检查和总EWT

在此处输入图片说明 enter image description here 在此处输入图片说明

This is my sample data for your use case. 这是我的用例示例数据。 This is to show how to achieve your req. 这是显示如何达到您的要求。 You could modify as per your req. 您可以根据自己的要求进行修改。

在此处输入图片说明

create parameter as below 创建如下参数

在此处输入图片说明

Now create row visibility expression as below 现在创建如下行可见性表达式

在此处输入图片说明

Note just for simplicity purpose I have made condition as if user selects TR-AFP then show records with only Category="electronics" and if user selects "ALL" then everything except category="electronics" 请注意,仅为了简单起见,我已经做出了这样的条件:用户选择TR-AFP然后显示仅带有Category =“ electronics”的记录,如果用户选择“ ALL”,则除category =“ electronics”之外的所有内容

You just have to adjust according to your column and it's Value 您只需要根据您的专栏进行调整即可,它的价值在于

=IIF(Parameters!ReportParameter1.Value=1 and Fields!category.Value<>"electronics",true,
IIF(Parameters!ReportParameter1.Value<>1 and Fields!category.Value="electronics",true,false))

Here is how it looks, Look for Right hand side, left hand one is just for your ref as database 这是它的外观,查找右侧,左侧仅是供您参考的数据库

在此处输入图片说明

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM