I'm semi new to Crystal Reports so I'm hoping someone can help. I am using version 10 and am pulling data from a large database to make a monthly report of statistics for the company I work for (it's a police department).
I have a main report that requests dates and then I have created 6 subreports in it that pass the date request from the main to each of the sub reports. On each of the subreports I am trying to do nothing more than give a count of the numbers between the desired date ranges.
One subreport I am counting how many traffic citations we have issued and filed with one of three different courts and how many charges have occurred on each citation (some could be cited for speeding and improper lane change at the same time.) What I'm trying to present is as follows...
Citations Charges
Court A 15 20
Court B 95 105
Court C 35 65
Total 145 195
The easy solution would be a group however our system does not seperate the data for which court it was filed with, therefore I'm trying to make a formula do it. The issue I'm having is Citations is showing the exact same number as Charges even though I have two different formulas. I currently have...
For the total fields I have....
Total Cite: If ({P_CITE_TAB.CITE_DTE} = ({?@CiteFrom} to
{?@CiteTo})) Then 1 Else 0
Total Charge: If ({P_CITE_TAB.CITE_DTE} = ({?@CiteFrom} to
{?@CiteTo}) And {P_CITE_TAB.CITE_CD} = ["TC","W"] And
({P_STATUTE_TAB.STATUTE_ID} like ["3*","4*"])) Then 1 Else 0
I am them using the Summary option and selecting Count this Summary By "Sum." Both columns produce the same numbers.
The STATUTE_ID tells me what court it goes to along with the CITE_CD. The Total Charge column comes up correct, but the Total Cite charge shows the exact same numbers all the way down as the total charge.
Thoughts?
Edited by JediSkipdogg - 16 Apr 2015 at 1:44pm