combobox filtering

Stimulsoft Reports.NET discussion
jmmv
Posts: 10
Joined: Mon Feb 13, 2012 5:00 am

combobox filtering

Post by jmmv »

I have a combobox that is binded with this field: Req.code
Now I would like to filter the items that are shown in it by the beginning of the characters of this field, like "FIX" and then a wildcard for all the numbers of FIX (FIX0001, FIX0002, ...)
How can I achieve this with the designer?

many thanks
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

combobox filtering

Post by HighAley »

Hello.
jmmv wrote:I have a combobox that is binded with this field: Req.code
Now I would like to filter the items that are shown in it by the beginning of the characters of this field, like "FIX" and then a wildcard for all the numbers of FIX (FIX0001, FIX0002, ...)
How can I achieve this with the designer?
Please, try to use next expression in the filter:

Code: Select all

Req.code.Substring(0, 3) == "FIX"
Thank you.
jmmv
Posts: 10
Joined: Mon Feb 13, 2012 5:00 am

combobox filtering

Post by jmmv »

Aleksey wrote:Hello.
Please, try to use next expression in the filter:

Code: Select all

Req.code.Substring(0, 3) == "FIX"
Thank you.
Thanks for your support. Unfortunately with this expression nothing is shown...
Image img
Is this the right place to put the expression? I could not find any other field that could be right.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

combobox filtering

Post by HighAley »

Hello.

We need more time to prepare an answer for you.

Thank you.
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

combobox filtering

Post by Alex K. »

Hello,

You can create additional datasource (as Data from other datasource) which will contains only records with substring "FIX" and use it additional data source in Combobox.

Thank you.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

combobox filtering

Post by HighAley »

Hello.

Please, look at the attached report template.

Thank you.
Attachments
1652.Report.mrt
(21.52 KiB) Downloaded 243 times
jmmv
Posts: 10
Joined: Mon Feb 13, 2012 5:00 am

combobox filtering

Post by jmmv »

Aleksey wrote:Hello,

You can create additional datasource (as Data from other datasource) which will contains only records with substring "FIX" and use it additional data source in Combobox.

Thank you.
great, worked perfectly.
Thank you very much for the support. Thanks also for the example report, made it easier to understand.
jmmv
Posts: 10
Joined: Mon Feb 13, 2012 5:00 am

combobox filtering

Post by jmmv »

Aleksey wrote:Hello,

You can create additional datasource (as Data from other datasource) which will contains only records with substring "FIX" and use it additional data source in Combobox.

Thank you.
How can I make this new datasouce (data from other datasource) persist?
Every time I close the designer it disappears and I have to recreate it.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

combobox filtering

Post by HighAley »

Hello.
jmmv wrote:How can I make this new datasouce (data from other datasource) persist?
Every time I close the designer it disappears and I have to recreate it.
The Data Source from other Data Source should stay. Did you save this report?

Thank you.
jmmv
Posts: 10
Joined: Mon Feb 13, 2012 5:00 am

combobox filtering

Post by jmmv »

Aleksey wrote:Hello.
jmmv wrote:How can I make this new datasouce (data from other datasource) persist?
Every time I close the designer it disappears and I have to recreate it.
The Data Source from other Data Source should stay. Did you save this report?

Thank you.
Yes I saved it...
I just added the datasource again and made also some changes to the report and saved it again. After closing and reopening the Designer only the new datasource is no longer there.
Post Reply