Help - Search - Members - Calendar
Full Version: SUM excepretion Operations
Fast Reports forum > Fast Reports Products > FastReport 4.0
Programmer
Hi all,

i have two tables master and detail hte master has a count and the the ditail has the price and i want to make a collective sum of the total price in the page summery, so can i put operation in a SUM excepretion? Like this

[SUM(<items."price"> * <orders."count">)]
gpi
Yes, you can
Programmer
thank you, and you can put a words in state of a boolean format without having an error like: [<dataset."fild1"> #bhas warranty, hasn't warranty]
gpi
Use IIF function
Programmer
i ran into a state witch i want to print just a summery page, (witch has SUM operations, and incude excepretions) for datesets summery, but when i preview the page its seems to me that the operation didn't take a value unless you put there excepretions datasets bands in the page (witch i don't what to view),i tried to hide them (by setting visible property to false), i didn't get the watted result.
so how can i fix the problem?
gpi
QUOTE
3.6 Aggregate functions
In most cases, group reports need to display some summary result information
(such as: “total of a group,” “number of group elements,” etc). FastReport provides these
aggregate functions this purpose. With their use, one can retrieve the defined aggregate
value over a data span. The list of aggregate functions:
SUM Returns the total of the expression
MIN Returns the minimal value of the expression
MAX Returns the maximal value of the expression
AVG Returns the average value of the expression
COUNT Returns the number of lines (rows) in the data span
The syntax of all aggregate functions (except COUNT) is as shown below, using an
example of the “SUM” function):
SUM(expression, band, flags)
SUM(expression, band)
SUM(expression)
The parameters assignment is as follows:
expression – the expression, the value of which will be handled
band – the name of data band, on which the value(s) to be handled originally reside
flags – a bit field, which can be the following values or their sum
1 – include invisible bands in calculation
2 – accumulate the value or running total(do not reset the result value when the
current data span resets)
An expression is the only mandatory parameter; all the rest are optional.
Nevertheless, it is recommended to always use band parameters, to avoid mistakes.
The “COUNT” function has the following syntax:
COUNT(band, flags)
COUNT(band)
The parameters assignment is similar to the one described above.
There is a general rule for all aggregate functions: a function can be counted only
for the data-band and used only in that band’s footer (the following bands refer to the
latter: footer, page footer, group footer, column footer, and report footer( summary band)
).
Programmer
thanks.
i found it.
the solution is simple, just set the count invisible data band (or dataset) option, after hiding the data bands.
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.