31-08-2015 04:46 PM
We are trying to create a report containing a 'gauge' using the Mega Report Studio. We can create the gauge successfully, but now wish to modify the parameter to be a 'percentage' and not just a 'count'.
Here is the contents of the method that we are currently using. What would be the correct syntax for showing the the percentage?
'MegaContext(Fields,Types)
'---
'Compute
' You must return an object (collection, object, text, value...) to display
'---
'You can access header elements in a collection:
' config.headers.item(i)
'---
'You can optionnally set:
' config.color = "[RGB hexadecimal color]"
' config.currency = [true|false|a currency]
' config.percentage = [true|false]
' config.drilldown = [object collection]
' config.image = [true|false]
'---
'Input is a collection with the following functions:
' count()
' item(...)
' avg(oAtt)
' max(oAtt)
' min(oAtt)
' sum(oAtt)
'---
Function Compute(input,config)
Compute=input.count
End Function