I'm using CRV11...
I have a bunch of detail data returned from a view and I want to do a lot of calculations based upon the data. And then I want to display these calculation results in the detail section of my report. I won't be displaying any detail data as its returned from the database in the detail section. NOTE: The data read from the database is not grouped or anything.
Some of the detail data look like...
JobFunction SalesOrg JobFunctionDesc AccountOwner
751 755 Sales N
751 755 Sales Y
751 755 Sales Y
752 759 Marketing N
First thing I needed to do is count the number of persons that have a JobFunction = 751 and a SalesOrg value of 755 and are AccountOwners.
Simple I would think - create a formula:
********************************
WhileReadingRecords;
Global NumberVar Cnt755Ao;
If {RMAL_V_PB_DETAIL.Job_Function} = 751 and
{RMAL_V_PB_DETAIL.Account_Owner} = 'Y' and
{RMAL_V_PB_DETAIL.Sales_Org} = 755 and
Not IsNull({RMAL_V_PB_DETAIL.Sales_Org})
then
(
Cnt755Ao := Cnt755Ao + 1
)
********************************
Then I would have the output of this formula value available for displaying in the detail section.
I originally put this formula field in the Detail Section (no other fields in the section). One row shows up for each returned detail row - in above example 4 rows are returned. Row 1 has a 0 formula value, row 2 has a 1 formula value row 3 has a 2 formula value and row 4 has a 0 formula value. Output is correct. But I only want the output formula value of 2 (the total based upon my conditions)
I need to do a ton of formulas like this.
How do I get just the final total formula value (2) for display purposes (1 row only)?
Thanks in advance.
I have a bunch of detail data returned from a view and I want to do a lot of calculations based upon the data. And then I want to display these calculation results in the detail section of my report. I won't be displaying any detail data as its returned from the database in the detail section. NOTE: The data read from the database is not grouped or anything.
Some of the detail data look like...
JobFunction SalesOrg JobFunctionDesc AccountOwner
751 755 Sales N
751 755 Sales Y
751 755 Sales Y
752 759 Marketing N
First thing I needed to do is count the number of persons that have a JobFunction = 751 and a SalesOrg value of 755 and are AccountOwners.
Simple I would think - create a formula:
********************************
WhileReadingRecords;
Global NumberVar Cnt755Ao;
If {RMAL_V_PB_DETAIL.Job_Function} = 751 and
{RMAL_V_PB_DETAIL.Account_Owner} = 'Y' and
{RMAL_V_PB_DETAIL.Sales_Org} = 755 and
Not IsNull({RMAL_V_PB_DETAIL.Sales_Org})
then
(
Cnt755Ao := Cnt755Ao + 1
)
********************************
Then I would have the output of this formula value available for displaying in the detail section.
I originally put this formula field in the Detail Section (no other fields in the section). One row shows up for each returned detail row - in above example 4 rows are returned. Row 1 has a 0 formula value, row 2 has a 1 formula value row 3 has a 2 formula value and row 4 has a 0 formula value. Output is correct. But I only want the output formula value of 2 (the total based upon my conditions)
I need to do a ton of formulas like this.
How do I get just the final total formula value (2) for display purposes (1 row only)?
Thanks in advance.