Hi Everyone
Just wondering if it is possible to filter a data band with more than one statement block, I know you can add as many filters as you wish, as long as they all use the same operator, ie: AND / OR
So you can have, filter results on Databand.Column1 = "Test" AND Databand.Column2 = "Foo" AND Databand.Column3 = "Mars"
Same can be done with the OR, filter results on Databand.Column1 = "Test" OR Databand.Column1 = "Foo" OR Databand.Column1 = "Mars"
What I am wondering is can you combine the operators to produce something like:
(Databand.Column1 = "Test" OR Databand.Column1 = "Foo") AND Databand.Column3 = "Mars"
I cannot see a way of doing this is the data band filter, something like what is in the conditions wizard, where you have layered conditions allowing you to create the above scenario
anyone know if this can be done?
Cheers
Tom
Multiple Filters On Data Band
Multiple Filters On Data Band
It can be achieved using one filter, however you must write the expression in either C# or VB.NET code for it to work.
On the Filter window you change the dropdown for 'Field Is' to 'Expression'.
Then you can type your filter expression into the textbox.
So if it was C# you could use the following filter expression:
On the Filter window you change the dropdown for 'Field Is' to 'Expression'.
Then you can type your filter expression into the textbox.
So if it was C# you could use the following filter expression:
Code: Select all
(Databand.Column1 == "Test" || Databand.Column1 == "Foo") && Databand.Column3 == "Mars"
Multiple Filters On Data Band
Thanks Brendan, much appreciated, I will give it a try
Tom
Tom