Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with summary on a report

Status
Not open for further replies.

oakleycheap

Technical User
Dec 6, 2006
4
US
Need some help with doing a summary in one of my reports. I have a report that is currently running and giving me correct totals on the groups and a correct summary total. My table has a column in it called “Status”. Status can have 4 values in it, AB, AC, AD or D1. I need to have a count for all pieces with a status of AB or D1.
I have tried coming up with a Running total, but I can never get the formula correct, also I have tried to create a new field that does the selection, but that throws off my Total count, that is also in the Report Footer. I also tried to do a cross-tab section but I don’t know how to create that to give me the data that I’m looking for.
Thanks for any help you can provide.
 
Create a formula of:

if {table.status} in ["AB","D1"] then
1
else
0

Place that in the details, right click it and select insert->summary->sum

Now you can delete it from the details.

You now have a count in ther report footer.

If this isn't where you wanted it, post specifics.

-k
 
now after testing I see that there could also be null values, this didn't seem to work
If isnull{ado.Status} or
{ado.Status} in ["AB","D1"] then
1
else
0

If {ado.Status}in ["WTR","WT", ""] then
1
else
0

How would I get a null value also added into the total sum.

 
You are posting in the wrong forum--you should be in the CR Formulas forum or the CR Other topics forum.

Your formula should look like this:

if isnull({ado.Status}) or
{ado.Status} in ["AB","D1"] then
1
else
0

Or to allow for spaces in the field, you could use:

if isnull({ado.Status}) or
trim({ado.Status}) = "" or
{ado.Status} in ["AB","D1"] then
1
else
0

-LB
 
Thanks for the response I will try to get it in the correct forum next time.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top