This topic is locked

Calculating Percentage on Report

3/17/2010 10:57:14 AM
ASPRunnerPro General questions
D
dsk author

I am running ASPRunnerPro 5.2 Build 423.
I am trying to capture the value of a sum field to divide against the value of another sum field in order to obtain a percentage. How do I write the code to capture that value in VB Script?
I'm sorry I am not a programmer. I have not worked with the reports before, so I'm a little confused. I've searched the forums and other resources but cannot seem to find a sample of code for what I am trying to do (and maybe I'm trying to do it the wrong way anyway.)
Thank you for your assistance.

D
dsk author 3/18/2010



I am running ASPRunnerPro 5.2 Build 423.
I am trying to capture the value of a sum field to divide against the value of another sum field in order to obtain a percentage. How do I write the code to capture that value in VB Script?
I'm sorry I am not a programmer. I have not worked with the reports before, so I'm a little confused. I've searched the forums and other resources but cannot seem to find a sample of code for what I am trying to do (and maybe I'm trying to do it the wrong way anyway.)
Thank you for your assistance.


** I was able to change sql query to obtain the data I am looking for, however, if anyone could tell me how to capture on the VBScript side I would still appreciate it.
Thank you

D
dsk author 3/18/2010

[quote name='dsk' date='18 March 2010 - 11:59 AM' timestamp='1268927977' post='48577']
** I was able to change sql query to obtain partial data that I am looking for, however, although I can find a percentage per row I cannot take the group sum of two different fields and obtain a percentage without being able to capture the value of the summed field. I cannot find any examples that indicate how to write the value of the sum. The $ does not work in VB and the code that I would normally use to capture a value off a form does not work on reports. Any assistance would be greatly appreciated.
Thank you

J
Jane 3/19/2010

Hi,
unfortunately there is no easy way to select calculated values on the report.

In general you need to write custom query to select these values in the event. Actual code depends on your data and settings in the poject.

I recommend you to publish your project on Demo Account and open a ticket at http://support.xlinesoft.com sending a URL to your pages along with detailed description of what you want to achieve.