Multiple Criteria

Stimulsoft Reports.NET discussion
Post Reply
MikeC
Posts: 51
Joined: Mon Jun 07, 2010 3:36 pm

Multiple Criteria

Post by MikeC »

I'm working on a report that breaks down parcel types for tax purposes. I would like the user to be able to choose the parcel type from a predefined list (GE for Gas and Electric, UT for Utilties and PP for Pipeline).

I have a form with user defined choices that match the data in the table parcel.[parcel type]. The field that I have on the form is called ParcType.

On the databand I have the expression Parcel.Parcel_Type_Code== ParcType .

When I run the report it works perfectly if the I only select one parcel type such as GE. I'd like to be able to select more than one, for example, if the user wants to see both GE and UT, or UT and PP.

What do I need to change on the databand or in the expression so that it will pull more than one parcel type into the report?

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

Multiple Criteria

Post by Andrew »

Hello,

You need to use the CheckBoxes to select more than one level of condition.
Then you need to change condition.
I should be something like this:
(Parcel.Parcel_Type_Code == const1 && CheckBoxControl1.Checked) ||
(Parcel.Parcel_Type_Code == const2 && CheckBoxControl2.Checked) ||
(Parcel.Parcel_Type_Code == const3 && CheckBoxControl3.Checked)

Thank you.
Post Reply