简体   繁体   English

SSRS:尝试过滤文本框/报表项

[英]SSRS: Trying to Filter a Textbox/Report Item

I have calculated the % between 2 numbers using an expression in a table. 我已经使用表中的表达式计算了2个数字之间的百分比。

I want to only filter the results that are below -20% 我只想过滤低于-20%的结果

I have tried going to 'Tablix Properties' -> 'Filters' and then input 我尝试过转到“ Tablix属性”->“过滤器”,然后输入

'Expression: TextBox34' (Text) “表达式:TextBox34”(文本)

'Operator: <' “操作员:<”

'Value: -0.2' '值:-0.2'

I cant get any results, is it possible to filter an Expression? 我无法获得任何结果,是否可以过滤表达式?

Im using Visual Studio 10, and PostgreSQL 9.2 我正在使用Visual Studio 10和PostgreSQL 9.2

Update 12 July - To throw more light onto my problem. 7月12日更新-为我的问题提供更多的信息。

I'm calculating the 12 month average sales, and the most recent 2 months average sales. 我正在计算12个月的平均销售额,以及最近2个月的平均销售额。 With these 2 numbers, im going to calculate the percentage to see which customers orders have dropped in the past 2 months. 有了这两个数字,即时通讯将计算过去两个月内哪些客户订单下降的百分比。

In order to get the numbers of the 12mth-avg-sales and 2mth-avg-sales i actually created 2 separate tables-matrix. 为了获得平均12个月和2个月的销售数量,我实际上创建了2个单独的表格矩阵。

I then created another table and then used LookUp so that both 12mth-avg-sales and 2mth-avg-sales are in the same table. 然后,我创建了另一个表,然后使用LookUp将12mth-avg-sales和2mth-avg-sales都放在同一个表中。

So now the Main table looks like this 所以现在主表看起来像这样

|Customers|12mth-avg-sales|2mth-avg-sales|Percentage|

As you can imagine, both 12mth and 2mth avg sales are both expressions. 您可以想象,平均12个月和2个月的平均销售量都是表达方式。

And to calculcate the Percentage is also an expression. 计算百分比也是一种表达。

I'm hoping to filter the Percentage to show only those below 20%... Any solutions? 我希望过滤百分比以仅显示低于20%的百分比...有解决方案吗?

You should set up a filter similar to this: 您应该设置类似于以下内容的过滤器:

在此处输入图片说明

The most important thing to note is that this is not referring to a textbox but to a field in the table dataset. 需要注意的最重要的事情是,这不是指文本框,而是表数据集中的一个字段。

Depending on your underlying data types you may have to tweak this. 根据您的基础数据类型,您可能需要对此进行调整。

Example data without filter: 不带过滤器的示例数据:

在此处输入图片说明

With filter: 带过滤器:

在此处输入图片说明

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

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