cancel
Showing results for 
Search instead for 
Did you mean: 

How to read and evaluate record in formula field

Former Member
0 Kudos

Hi All,

How could we read the data of records in a table and evaluate to get a single value to display in report, through the formula field.

As I am facing this problem to display a value in the report, which I have to get the data from the table from all records having Status as Y, Evaluate each data and sum the evaluated value. At last display the sum in report.

Can this be done in Formula Editor?

If yes please can any one give any sample code.

Thanks and regards

Accepted Solutions (1)

Accepted Solutions (1)

amrsalem1983
Active Contributor
0 Kudos

do you mean you have a formula in some field

like some field having 10+20-50

some equation like that, and you want to evaluate it?, or what?

thank you

Former Member
0 Kudos

Hi,

Actually I am having 2 values in my report from 2 diff tables.

The first is Actual Cost and the Second is Percentage which is x% of Actual Cost. Now Total Cost =Actual Cost + Percentage Amount.

There is a table of Escalation Head and Detail. In Detail Table there are 2 fields, having numeric data, as Fld_A, Fld_B

From Detail table of Escalation I have to fetch each data in Fld_A and Fld_B, then calculate the Value as per the formula given.

Value=0;

Value=Value + (Total Cost * Fld_A) * (Fld_B/100);

At the end the Value has to be displayed in report.

I have to calculate this in a Formula and display the result of the formula. So how to write the code to read the each data and evaluate to get the Total Calculated Value at End.

I have very less knowledge about Crystal Report and Working in Formula Field, so kindly give the code to solve the problem.

Thanks and Regards

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi, Md.

First, You can try Select Expert - Record: choose field 'Status' is equal to 'Y'.

Then all data with status = Y will be displayed.

Second, you can choose Insert Summary,

then choose the field to summarize, and choose "Sum" in the box 'Calculate this summary'.

then choose summary location like Report footer or tick ' Add to all group level'.

This will solve your question.

~Michelle