| Author |
Message |
bkcash
Newbie
Joined: 10 Aug 2015
Online Status: Offline
Posts: 2
|

Topic: Search by Multiple Race Codes Posted: 14 Aug 2015 at 3:58am |
|
I am a crime analyst and have been tasked with pulling data from our records database regarding racial demographics of violent crimes. The goal is to determine violent crime ratios with regards to the race of the victim and offender. Using the formula below I am able to pull a list but cannot figure out how to refine it.
{lwmain.date_rept} in date (2013, 01, 01) to date (2013, 12, 31) and
{lwnames.name_code} in ["OF","VI"] and
{lwnames.race} = "W"
This pulls all offenses where there is EITHER an offender or victim who is white. But what I need is to pull all offenses where there is BOTH a victim and offender and BOTH are white.
I would appreciate any help. I've searched all over crystal report websites and found some things that are similar, but have not been able to adapt those solutions to what I'm looking for.
Brian Cash
Leesburg Police Department
|
IP Logged |
|
|
|
DBlank
Moderator
Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
|

Posted: 14 Aug 2015 at 4:17am |
|
you will need to explain your data set more.
it appears that you have multiple rows of data associated to one 'incident'. Each row then defines how it is part of the incident by setting values as a OF or VI and then associating the race to that individual that is associated to an incident.
From this model I am guessing that multiple offenders and victims can be associated to one incident. If so do you need all participant to be the same race or just one VI and one OF?
Also these are generally more easily handled through a data source change like a stored procedure. Is that an option for you?
|
IP Logged |
|
bkcash
Newbie
Joined: 10 Aug 2015
Online Status: Offline
Posts: 2
|

Posted: 14 Aug 2015 at 6:51am |
|
Each report can have multiple offenders and victims, which causes duplicates because there are as many rows of data displayed as there offenders and victims, or reports being displayed where there is only an offender or victim. I need the formula to find reports that have at least one offender and one victim both of the same race in this case, and then return a simple list I can count.
Finally, I have to admit that I'm not sure what you mean by a data source change. Currently I'm pulling straight from the SQL tables.
|
IP Logged |
|
|
|