Help - Search - Members - Calendar
Full Version: problems with SUM of SQLEXP field
Fast Reports forum > Fast Reports Products > FastReport 4.0
podobca
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!

gordk
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.
evariste
I am user of Pantheon too 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
podobca
QUOTE(evariste @ Feb 21 2010, 10:29 AM) *
I am user of Pantheon too 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


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">)+'''')]
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2012 Invision Power Services, Inc.