Skip to Content
0
Former Member
Nov 27, 2008 at 02:54 AM

Crystal Reports XI - How to create a new field using a formula field

245 Views

I'm quite new to CR, but have been learning quickly!

I would like to know how to automatically create a new record/field based on another field in that row...

I have a report showing the following data:

Run Code Start KM Stop KM Status

H2 100 150 Partial

H2 150 155 Partial

H2 155 160 Partial

S3 120 150 Completed

The status is generated by comparing the 'Start KM' and 'Stop KM' against fields in another table called 'Start Odo' and 'Stop Odo'

In this example...

H2 has 'Start Odo' and 'Stop Odo' values of 90 to 160, therefore there is still 90-100 to check. The 'Start KM' and 'Stop KM' is equal to the 'start Odo' and 'stop Odo' for S3, therefore it shows completed.

My question is how do you create a formula field, which will add an entire row...displaying the values 90-100.

I've been trying to use a conditional check in the 'Start KM' column, that sees if status is equal to partial than if start km is greater than start odo (Which is the reference km) then display the value of start odo in the new row. I'm stuck at how to create a new row.

I want the final result to look like this...

Run Code Start KM Stop KM Status

H2 90 100 Partial

H2 100 150 Partial

H2 150 155 Partial

H2 155 160 Partial

S3 120 150 Completed

Any suggestions would be more than appreciated 😊