Page 1 of 1
Filtering question (newbie)
Posted: Wed Dec 09, 2009 9:12 am
by Liem
Hello from Holland,
I'm trying to filter out rows from my report when some criterion is false. The filter itself works OK, but I cannot figure out how to make the row completely invisible.
One component on the row is {Product.description}: In a valid row this would be rendered as e.g. "Pickup rate:" When the rate is 0 I don't want to see the row at all, but in my report I still see ":". How do I make the row completely invisible?
The filter is set on the data band, by r-clicking on the band header in the report designer, and choosing Design... and then Filters.
Filtering question (newbie)
Posted: Wed Dec 09, 2009 5:37 pm
by Edward
Hi
Please show the filter expression you set in the DataBand's Filter.
Thank you.
Filtering question (newbie)
Posted: Thu Dec 10, 2009 2:37 am
by Liem
Hi Edward,
The last expression filter I tried was
Code: Select all
!Product.OrderRegel.TotaalBedrag.ToString("N2").Equals("0,00")
but I also tried a value filter "Numeric Value Orderregel.TotaalBedrag greater than 0".
As I mentioned before, I think that the filtering action itself works. What it does surprises me.
There are three items/columns in the band:
{Product.Description}:
{Product.OrderRegel.Number} x € {Product.OrderRegel.Price.ToString("N2")} =
€ {Product.OrderRegel.TotaalBedrag.ToString("N2")}
When the total price is > 0 all is well. When total price is 0 and I don't want to see this line, I get
: 0 x € 0,00 =
I set the property Hide Zeros to True for all three items.
Strange thing: when I use the filter expression "false", nothing is shown in the data band. So filtering out all lines works, but not filtering out 1 line...
Thanks for your help!
Filtering question (newbie)
Posted: Thu Dec 10, 2009 5:24 am
by Edward
Hi
If you need to make a StiText component to shrink automatically to zero height, then it must contain no symbols at all. You can hide ':' symbol as follows:
{String.IsNullOrEmpty(Product.Description)?"":":"}
or as follows:
{IsNull(Product,"Description")?"":":"}
To filter out all values you also should be careful to cast numeric values to string as regional settings will be applied to values.
So the following form is more acceptable:
Product.OrderRegel.TotaalBedrag != 0m
Thank you.
Filtering question (newbie)
Posted: Thu Dec 10, 2009 5:33 pm
by Liem
Thank you very much! This was exactly the info I needed.
Filtering question (newbie)
Posted: Fri Dec 11, 2009 2:15 am
by Edward
Hi
You are very welcome
Please let us know if any help is required.
Thank you.