Hi there,
Excuse me if this seems rather elementary, but I'm just not seeing the best way to do this.
I've been asked to write a report for all inmates in a prison that have NOT been convicted of certain offenses. The problem is that offense are actually statute numbers that are very complex.
Pulling the data is not the problem, as it's readily available. Basically, I grouped by the inmate number, and put everything he's ever been convicted of in his "career" in the detail line. What I have looks like this:
INMATE#: 123456 INMATE_NAME: JOSEPH D. JAILBIRD
123.12
234.12(1)
234.125(2)
234.127
301.01
301.01(1)
301.01(1B)(2)
So you can see, the inmate number and name are grouped as Group 1, and the statutes he is convicted of are details.
Now, they have given me a list of statues that should exclude inmates from being on this report. The problem I have is the way the statute numbers are. For instance, assume that I DO NOT want to include anyone with a 301.01 conviction on the report.
I used a formula that said:
"if (InStr({offender_offenses.stat},"301.01") > 0) then 1
The Idea being that if the formula returned a "1", I could do a group level sum on them and omit any offender where the sum was greater than 0.
But, my formula will also assign a "1" to 301.01(1) and 301.01(1B)(2), since they contain "301.01" in the string. I do not necessarily want that.
Any ideas on how to get around this?
Thanks!