Wildcards in an expression
Posted: Tue Jun 10, 2014 3:22 pm
Hi,
Apologies if I'm in the wrong forum, I'm using Stimulsoft Reporting Tool that is integrated into another software package therefore I don't know if .Net is the correct version.
I have a databand which contains a column called Comment - I am trying to create two totals for this column that contains a total of how many occurrences of the word 'training' appears, and another total for how many occurrences of 'sickness' appear. The Comment field may contain other character therefore I am trying to use wildcards to find this, I am using the expression: {Fields.COMMENT == "*training*" ? 1 : 0} - please note I am doing this in the same data band as where the Comment field is located. This hasn't worked as even where the word training does appear, the result is 0 instead of 1.
Once I got the above bit working my plan was to wrap the above statement into a SUM formula to find out the total, something like: {SUM(Fields.COMMENT == "*sickness*" ? 0 : 1)} - but as the first part hasn't worked I haven't tried this part yet.
Can you please help me to first of all use the wildcards effectively and then create a total. Please note I want to locate the above words separately - so whatever I do to find occurrences of the word 'training' I will create a separate expression to find the occurrences of the word 'sickness'.
Thanks,
Any help much appreciated.
Apologies if I'm in the wrong forum, I'm using Stimulsoft Reporting Tool that is integrated into another software package therefore I don't know if .Net is the correct version.
I have a databand which contains a column called Comment - I am trying to create two totals for this column that contains a total of how many occurrences of the word 'training' appears, and another total for how many occurrences of 'sickness' appear. The Comment field may contain other character therefore I am trying to use wildcards to find this, I am using the expression: {Fields.COMMENT == "*training*" ? 1 : 0} - please note I am doing this in the same data band as where the Comment field is located. This hasn't worked as even where the word training does appear, the result is 0 instead of 1.
Once I got the above bit working my plan was to wrap the above statement into a SUM formula to find out the total, something like: {SUM(Fields.COMMENT == "*sickness*" ? 0 : 1)} - but as the first part hasn't worked I haven't tried this part yet.
Can you please help me to first of all use the wildcards effectively and then create a total. Please note I want to locate the above words separately - so whatever I do to find occurrences of the word 'training' I will create a separate expression to find the occurrences of the word 'sickness'.
Thanks,
Any help much appreciated.