Need help with field sums

edited 8:40PM in FreeReport
I have been modding the program "Ant Movie Catalog" to use as a basic stock cataloguing tool. All is going well so far, and have been working on a print out report for order forms.

The report designer that is used is FreeReport 2.32, I have taken care of the design/layout I require for the report, and all that is left to do is add a simple box which multiplies the [Resolution] field by [Length] field and prints the sum. Since I know very little about coding I am having trouble implementing this... Could you help me out please?

The help file suggests using the sum() expression parser, and antp (the author of AMC) suggested putting this in the text field script option -

begin
tmp1 := IntToStr(StrToInt([length]) * StrToInt([resolution]));
end;

Neither of which have worked [img]style_emoticons/<#EMO_DIR#>/sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" /> This is all very new to me, so if you guys point me in the right direction that would be a huge help! Thanks, Dawson[/img]

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 8:40PM
    Dawson its been a long time since i worked with 2.32
    IIRC all you need in the memo is fieldname]*[fieldname
    you only use the sum function when summing values of multiple records.
  • edited 8:40PM
    Thanks you Gord, that got the ball rolling for me [img]style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /> I came into a few bugs where empty parenthesis were concerned, so I have changed it around a bit - if ([Length] <> '') then Totalcost := [Length] * [Resolution] else Totalcost := '-' Do you know if it is possible to have a count at the end of the report, tallying all the values [Totalcost] has given me?[/img]
  • edited 8:40PM
    Found a PDF manual on FastReport 4.. Very similar by the looks of it and has helped alot!

    Just created a report summary object with the following code -

    Total Order Cost - ??[SUM(<Totalcost>,MasterData1)]
  • gordkgordk St.Catherines On. Canada.
    edited 8:40PM
    count function is available just like sum function.
    don't try reading fr4 documentation for free report to many differences.
    ill post a couple of old fr2.? help files in the free report news group for you later to day or early tomorrow.

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.