Databand Filter

Stimulsoft Reports.NET discussion
Post Reply
TimWoods
Posts: 10
Joined: Thu Mar 27, 2014 9:56 pm

Databand Filter

Post by TimWoods »

I have a databand that I'd like to filter based on the contents of a variable (ceIncludeFutureCharges), which contains the word True or False. Using that variable, I need to compare two fields that are numeric and contain a 4 digit year (ChargeYear and OfficeYear). If the variable is False, I want to return all the charge years. If the variable is True, I want to return only the charge years that are less than or equal to the Office Year.

I'm trying to make something like this work
(if(ceIncludeFutureCharges=="False")
ChargeYear<=OfficeYear;
else
ChargeYear<=9999

How does an expression in a databand filter need to be constructed in order to make this work?
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Databand Filter

Post by HighAley »

Hello.

You could use any C# expression for filtering.
The specified code is not C# code.
Maybe next code will work:

Code: Select all

(ceIncludeFutureCharges=="False" && ChargeYear<=OfficeYear) || ceIncludeFutureCharges=="True"
Thank you.
TimWoods
Posts: 10
Joined: Thu Mar 27, 2014 9:56 pm

Re: Databand Filter

Post by TimWoods »

That worked. Thanks.
Andrew
Posts: 4109
Joined: Fri Jun 09, 2006 3:58 am

Re: Databand Filter

Post by Andrew »

Hello, Tim.

Great! Thank you for letting us know about this.

Have a nice day!
Post Reply