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

Get Decimals in the Percentages in Cross Tab 2

Status
Not open for further replies.

jpdmdc

Programmer
Mar 10, 2005
115
Hi,

I'm using Crystal reports 10 on Oracle 9i. I have a cross tab report which shows the percentages of call volume we have per month. The problem I have is it doesn't show the decimal points. For example - if the number is 15.8% it shows it as 15% only. i tried to change it by using the options in 'Format field' but all in vain. The Decimals option on my tool bar is disabled.

Please help.

Thank you.
 
Please explain how the crosstab is set up--the rows, columns, and summary. What is the percentage of? You will need to use variables in the formatting properties formula areas to recreate the percentage in order to add the decimals.

-LB
 
Hi Lbass,

Thank you so much for your reply.
It is a simple cross tab report which shows the call volume by center and by month as given below.

Jan Feb Total
NY 1stQ 1239 737 1976
23% 15% 19%
2ndQ 248 242 490
4% 5% 4%
3rdQ 12 12 24
0% 0% 0%
4thQ 3791 3648 7439
71% 78% 74%
Total Calls 5290 4639 9929
100% 100% 100%

So, i want one decimal for each of these percentages.
I have used Count(call_no) which is the number and have used the samething but chose the 'Show as percentage of' option which shows up in 'Edit Summary' window.

Hope I could explain.

Thank you.
 
Please identify your rows and columns by name--as they are entered into the crosstab expert.

-LB
 
Rows are - Center_name,Queue_name
Columns - Call_date(Only one column) grouped by month
Summarized column - CALL_ID
Count(call_id)

Is this what you were asking? If not, then sorry, I didn't get you. Can you explain me please?
 
Okay, because you have two row fields and you want the percentages to be based on the column total, this is a little more complicated. To make this work, you would need to format the crosstab so that the totals displayed at the top, rather than at the bottom, by going to the customize style and checking "column totals on top".

Select the center name column total (count)->right click->format field->common tab->suppress->x+2 and enter:

whileprintingrecords;
numbervar tot := currentfieldvalue;
false

Select the count summary in an inner cell->right click->format field->common tab->suppress->x+2 and enter:
whileprintingrecords;
numbervar curr := currentfieldvalue;
false

Then select your current percentage in the inner cell->right click->format field->common tab->DISPLAY STRING->x+2 and enter:

whileprintingrecords;
numbervar tot;
numbervar curr;
totext(curr%tot,1)+"%" //1 for 1 decimal

For the name total (percentage), right click->format field->common tab->DISPLAY STRING->x+2 and enter: "100%", since it will always be 100%.

-LB
 
Hi LBass,

Thank you again for your reply. I Numbervar Tot os taking the last value in that colum while Number Curr is able to take the currentvalue of the field. So, my numbers are messed up. I tried bringing the totals to the top and also to the left but nothing works.

Any other suggestion please?

Thank you once again.
 
The totals must be at the top--the left-right doesn't matter. I think you should make sure you implemented this correctly, as I did test this. If you want to identify each step you took I will help with this.

-LB
 
Hi LBass,

I have put the numbers/columns in "" to show you where I have put which formula.
On the row side I have two groups Center_Name and Queue while i have only one Date filed for column grouped by month.

Please let me know where I'm going wrong.

Thank you very much.

May/08 Jun/08 Total
California Total Orders 8,414 7,440 "15,854" 1st

1 Queue 4,409 "3,483" 7,892 2nd
"52%" 46% 49% 3rd
2 Queues 1,493 1,783 3,276
17% 23% 20%
3 Queues 1,420 1,224 2,644
16% 16% 16%
4 Queues 441 287 728
5% 3% 4%
5 Queues 54 42 96
0% 0% 0%
5+ Queues 5 1 6
0% 0% 0%
Auto 592 620 1,212
7% 8% 7%
 
May/08 Jun/08 Total
California
Total Orders "8,414" "7,440" "15,854" 1st

1 Queue "4,409" "3,483" "7,892" 2nd
"52%" "46%" "49%" 3rd
2 Queues 1,493 1,783 3,276
17% 23% 20%
3 Queues 1,420 1,224 2,644
16% 16% 16%
4 Queues 441 287 728
5% 3% 4%
5 Queues 54 42 96
0% 0% 0%
5+ Queues 5 1 6
0% 0% 0%
Auto 592 620 1,212
7% 8% 7%

You can select an inner cell and the row total at once and add the formula simultaneously. The 100% would go in the percentage for the center name total (which you are not showing in this sample).

-LB
 
LBASS,

YOU ARE AMAZING!!!

Thank you SOOOOOOOOOOOOOO Much! :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top