problems with SUM of SQLEXP field

Hello,

I've joined this forum in hope that you might be able to help me out with a few problems i've been having. We're using FastReport (version unknown - would love some help determening which version so i'd know where to look for help) together with Pantheon.

the problem is i've got a field that i calculate with multiplying two other fields ( example RVC = price * quantity) using SQLEXP. the problem is i can't find a way of adding up all those fields on report so for example:

Name price quantity RVC
alfa 40 2 80(SQLEXP (select ....))
beta 50 1 50(SQLEXP (select ....))

together: 130(how do i get this?)

Would realy help if you could tell me.

Thank you!

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 6:46PM
    open any report in design mode
    in the report tree window select report look in the oi and you will see the ver number.
    you dont need the sql expression
    just an expression in the memoview.
    look at the main demo underbasic reports nested groups report.
  • edited 6:46PM
    I am user of Pantheon too [img]style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /> Version of FastReport in Pantheon is 4.4.14. sqlexp always returns string, so you must convert it to number using function StrToFloat. Regards, Evariste[/img]
  • edited 6:46PM
    evariste wrote: »
    I am user of Pantheon too [img]style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /> Version of FastReport in Pantheon is 4.4.14. sqlexp always returns string, so you must convert it to number using function StrToFloat. Regards, Evariste[/img]

    it's 4.4.14

    i'm a bit of a new user, can you tell me where do i insert the StrToFloat and how would the end look like

    If i use this SQLEXP how would the sum look like:

    [SQLEXP('select (round((anStockPrice *anQty),3)) as Nab_vrednost from the_moveitem where acKey = '''+<qReportIzpis."acKey">+''' and anno = '''+ vartostr(<qReportIzpis."anno">)+'''')]

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.