Page 1 of 2

combobox filtering

Posted: Mon Feb 13, 2012 5:04 am
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

combobox filtering

Posted: Tue Feb 14, 2012 2:06 am
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.

combobox filtering

Posted: Tue Feb 14, 2012 3:21 am
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.

combobox filtering

Posted: Wed Feb 15, 2012 10:09 am
by HighAley
Hello.

We need more time to prepare an answer for you.

Thank you.

combobox filtering

Posted: Thu Feb 16, 2012 3:22 am
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.

combobox filtering

Posted: Thu Feb 16, 2012 3:25 am
by HighAley
Hello.

Please, look at the attached report template.

Thank you.

combobox filtering

Posted: Thu Feb 16, 2012 3:43 am
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.

combobox filtering

Posted: Thu Feb 16, 2012 6:06 am
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.

combobox filtering

Posted: Fri Feb 17, 2012 3:38 am
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.

combobox filtering

Posted: Fri Feb 17, 2012 4:58 am
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.