Home » Developer & Programmer » Reports & Discoverer » how to sum values from a different group
how to sum values from a different group [message #260702] Mon, 20 August 2007 14:17 Go to next message
deahayes3
Messages: 203
Registered: May 2006
Senior Member

I am trying to add up results from one group and display the result in another group but I keep getting the error "Reference column at a frquency below its group" Is there any way around this ????? The reason I can not get around this is b/c on the first group I have a trigger that only pulls certain values from query when the statement is true...otherwise I would put the sum in the same group.... any suggestions?
Re: how to sum values from a different group [message #260706 is a reply to message #260702] Mon, 20 August 2007 14:37 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Quote:
in the first group I have a trigger

Trigger? Do you mean a FORMULA column? If so, leave those columns in the first group and sum values "when the statement is true" (what statement? Some in the formula column?)

Create the same columns in the second group, just make them sum values "when the statement is false". Or whichever condition it is; I didn't quite understand what you do when this "statement" is true or false.
Re: how to sum values from a different group [message #260726 is a reply to message #260706] Mon, 20 August 2007 15:16 Go to previous message
deahayes3
Messages: 203
Registered: May 2006
Senior Member

thanks for responding so quickly, yes I meant formula column and as for the true statement this is whats going on
open spec_cur;
fetch spec_cur into spec_rec;
if spec_cur%found then
srw.set_field_num(0, :cf_specific_lbs);
else
srw.set_field_num(0, 0);
end if;
close spec_cur;
return (true);

so if the cursor is found it shows the value, if not replace it with a zero, I cant get the summary column to just add up the ones that are found in the cursor because :cf_specific_lbs is in another group.
Previous Topic: graphics builder
Next Topic: System.message_level Equivalent in Reports
Goto Forum:
  


Current Time: Sat Dec 10 01:06:35 CST 2016

Total time taken to generate the page: 0.07078 seconds