on 03-26-2012 8:16 PM
Hello,
I am using CR 2008. I have two fields, Quoted Price and Quantity Order which I made a summary field ({Table.QuotedPrice}) * ({Table.QuantityOrder}); which works great. My issue is I have a Total field that I made trying to sum up all the summary field in the details part of the report. Unfortunately the Quoted Price field and Quantity Order fields have duplicated data in the tables so I I have to check the box; Suppress If Duplicated. The Total summary field is still summing up the suppressed columns which is giving me the wrong total. Not really sure how to fix this issue. Thanks in advance, Eric
Hi Eric,
Here's what you need to do:
Modify the Summary formula that is placed on the details section to include this code:
WhilePrintingRecords;
numbervar c;
numbervar array a1;
numbervar t := {Table.QuotedPrice}*{Table.QuantityOrder};
if not(t in a1) then
(
c := c + 1;
redim preserve a1[c];
a1[c] := t;
)
else t;
Create another formula to display the total and place it on the Report Footer:
WhilePrintingRecords;
numbervar array a1;
numbervar i;
numbervar tot;
for i := 1 to ubound(a1) do
(
tot := tot + a1[i];
);
tot;
Let me know how this goes!
-Abhilash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.