Please help!

PixelPointerPixelPointer Vaughan, Ontario
edited 12:19PM in FastScript
<span style='color:blue'>With my current assignment at work, I am certainly running up a few forum posts. I apologise for posting so much, I usually spend about an hour or so trying to find the solution myself, and then I post here. So, here we go again...</span>

I am attempting to sum up Totals for the entire report, and totals for a grouping, and use each in the same row, for different calculations. Basically, I am finding the percentage usage on a whole, and the percentage usage by a summary group. Here is the code that I am using:
procedure ReportSummary1OnBeforePrint(Sender: TfrxComponent);
begin
       if not Engine.FinalPass then
       begin
               //Sum the prices and profit dollars for the entire report                                                                                                                          
               Set(<extSGRevenues>, Sum(<Price>, MasterData1,1));
               Set(<extSGProfitDollars>, Sum(<ProfitDollars>, MasterData1,1));
       end;
end;

procedure gfSummaryGroupOnBeforePrint(Sender: TfrxComponent);
begin
       if not Engine.FinalPass then
       begin
               //Sum the prices and profit dollars only for summary group                                                                                                                          
               Set(<extRCRevenues>, Sum(<Price>, MasterData1));
               Set(<extRCProfitDollars>, Sum(<ProfitDollars>, MasterData1));
       end;
end;

The issue that I am running into, is that both totals are showing up the same. Where I want the <span style='color:purple'><extRCRevenues></span> variable to hold the sums for each summary group, and the <span style='color:purple'><extSGRevenues></span> to hold the summary for the entire report.

As always, any assistance is GREATLY appreciated.

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.