I am trying to suppress duplicate values in a report, however the value I want to display comes from another column in the database.
I have duplicate values in my query and the two fields that I am interested in are a date and an amount. I want to find the duplicate dates and suppress the corresponding amounts. I cannot suppress on the amount as there could genuinely be duplicate amounts but there cannot be duplicate dates.
At the moment I am collating and displaying all the results using two formulas:
In the details section:
-----------------------
WhilePrintingRecords;
StringVar ResultMC;
StringVar Warning;
if {po.po_id} = {@PONumber} then
(
if length(CStr({mc.mc_amount}))+length(ResultMC) >= 255 then
Warning:= "Warning: some data is missing"
else
ResultMC:= ResultMC + "MC Amt: " + CStr($({mc.mc_amount})) + chr(13);
);
ResultMC
-----------------------
In the report footer section:
-----------------------
WhilePrintingRecords;
StringVar ResultMC;
ResultMC;
-----------------------
I think I need to check if the date is a duplicate and then add (or not add - if the date is a duplicate) the corresponding amount to the string which is being built in the details section.
I am going round in circles at the moment so any help would be greatly appreciated...
Thanks
I have duplicate values in my query and the two fields that I am interested in are a date and an amount. I want to find the duplicate dates and suppress the corresponding amounts. I cannot suppress on the amount as there could genuinely be duplicate amounts but there cannot be duplicate dates.
At the moment I am collating and displaying all the results using two formulas:
In the details section:
-----------------------
WhilePrintingRecords;
StringVar ResultMC;
StringVar Warning;
if {po.po_id} = {@PONumber} then
(
if length(CStr({mc.mc_amount}))+length(ResultMC) >= 255 then
Warning:= "Warning: some data is missing"
else
ResultMC:= ResultMC + "MC Amt: " + CStr($({mc.mc_amount})) + chr(13);
);
ResultMC
-----------------------
In the report footer section:
-----------------------
WhilePrintingRecords;
StringVar ResultMC;
ResultMC;
-----------------------
I think I need to check if the date is a duplicate and then add (or not add - if the date is a duplicate) the corresponding amount to the string which is being built in the details section.
I am going round in circles at the moment so any help would be greatly appreciated...
Thanks