Skip to Content
0
Aug 11, 2020 at 07:12 AM

How to calculate percentage in crosstab crystal report

274 Views Last edit Aug 11, 2020 at 08:31 AM 2 rev

Hi,

I've requirement to create a cross-tab in report. But the problem is I don't know how to do calculation for both of this column in crosstab:

1. Open 30%

Formula: Total Open Status per Assignee / Grand Total * 100

Example (Michael) : 10/ 28 * 100 = 35.71%

2. % permonth

Formula: Grand Total for all status per Assignee / Grand Total for Status * 100

Example (Michael) : 11/ 28 * 100 = 39.29 %

I've encounter an error 'Argument #2 of 'GridValueAt' is out of range' using below code :

if GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("OPEN"), CurrentSummaryIndex)=0 then 0 else GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("OPEN"), CurrentSummaryIndex)/ GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("Total"), CurrentSummaryIndex) * 100

Could someone teach me how to do the calculation and provide me with some sort of suggestion/solution to this issue?

Thank you.

Attachments

fpwzi.png (15.1 kB)
n7pxz.png (9.1 kB)