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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help with Counting and sorting

Status
Not open for further replies.

RavenXIII

IS-IT--Management
Mar 18, 2007
26
AU
Alright im using CR 8.5 and SQL 2003

I have a field with account stages in it 01 - 10 as every account has a stage and i need to count them per account manager i can get the totall per account manager but i also need to have a column for 01 and another for 02 - 10 eg

Account manager Total Stage 01 Stage 02-10
fred 200 50 150


How do i do this

Thankyou
 
Insert a CrossTab

If you need to combine some categories, create a formula and use that formula for the CrossTab columns.

- Ido

view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
HOw do i get it to only count the 01 or 02-10 records

also what is the formula for changeing boolean like from true or false to nobs or nubs
 
Sorry in kinda new at this

i go to format editor then Boolean click on the workshop button an enter in IF {boolean_field} THEN "nobs" ELSE "nubs" and it says the formula result must be a number

thanks
 
also how do i get the crosstab to add all the 02-10 records together in one column
 
Create a formula:

if {table.stage} = "01" then "Stage 01" else
if {table.stage} in "02" to "10" then "Stage 02-10" else
if {table.stage} >= "11" then "Stage 11+"

Use this as your crosstab column field.

For your other question, you should be creating the formula in view->field explorer->formula->new. Then drag the formula onto the report.

-LB
 
Thanks it worked

But the field is full of crap how do i tell it to scrap the other info and not count it
 
Try a record selection formula like:

{table.field} <> "crap"

:)

You need to specify the field you are referencing, define "crap", and show some sample data so that we can see what it is you are trying to eliminate. Do you need the info for other parts of the report or can it be eliminated in the record selection formula?

-LB

 
01 - To Call
02 - Called
03 - Potential Retail
04 - Potential Program
05 - Intro Meeting
06 - Consultation/Program Negoti
07 - Financials & TVP Presented
08 - Documentation Presented
09 - Verbal Agreement
10 - Current Client
Non Sales
Past Client
Stage 1
Waiting Allocation
 
Create a SQL expression {%left2} like:

left(table.`stage`,2)

Or use the left function in the function list of the SQL expression editor. Then set the record selection formula to:

{%left2} in "01" to "10"

You could alternatively use a record selection formula of:

val(left({table.stage},2)) in 1 to 10

The report would just be slower than if you used a SQL expression.

-LB
 
Thanks

now i need to add a percentage for "01" in a column at the end iv tried but with no go

This What i got ATM i need to add a 01% column between 02-10 and total


________________________________
______________|__01___|___02-10___|___Total___|
Some Guy______|__59___|____39_____|____95_____|
Some Gal______|__42___|____31_____|____73_____|
Total_________|__101__|____70_____|____168____|
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top