"Sum" problems
"Sum" problems
Hi Guys,
I'm a new with this stuff. i tried to create a report to which a dataset is binded
report.RegData(ds);
within my query i have a join between 2 tables let say goups (id, group, total...) and sub-groups (group, name, ...)
when i generate the report by grouping (group) it gives something like this
id ------- group -------- total ------- name sub-group
1 ------- 0001 -------- 20$ ------- x
1 ------- 0001 -------- 20$ ------- y
1 ------- 0001 -------- 20$ ------- z
1 ------- 0255-------- 10$ ------- a
1 ------- 0255 -------- 10$ ------- b
here's my prob. i want a subtotal of 30$ (20 + 10) but i can't do it !!!!!!!!
if i use the SUM property it gives 80$ OR depending where i put it, it gives me 2 subtotals 60$ and 20$
what can i do to solve this tiny porblem !!!
I'm a new with this stuff. i tried to create a report to which a dataset is binded
report.RegData(ds);
within my query i have a join between 2 tables let say goups (id, group, total...) and sub-groups (group, name, ...)
when i generate the report by grouping (group) it gives something like this
id ------- group -------- total ------- name sub-group
1 ------- 0001 -------- 20$ ------- x
1 ------- 0001 -------- 20$ ------- y
1 ------- 0001 -------- 20$ ------- z
1 ------- 0255-------- 10$ ------- a
1 ------- 0255 -------- 10$ ------- b
here's my prob. i want a subtotal of 30$ (20 + 10) but i can't do it !!!!!!!!
if i use the SUM property it gives 80$ OR depending where i put it, it gives me 2 subtotals 60$ and 20$
what can i do to solve this tiny porblem !!!
"Sum" problems
Hello,
Sorry, i'm not fully understand. You need calculate only first row from each group?
Thank you.
Sorry, i'm not fully understand. You need calculate only first row from each group?
Thank you.
"Sum" problems
I need to calculate the SUM of my "total" column. According to the example here, I need a total of 30$ (20 + 10).Vital wrote:Hello,
Sorry, i'm not fully understand. You need calculate only first row from each group?
Thank you.
the porblem with SUM, it returns the total of ALL columns (20+20+20+10+10) depending where i put it on the report !
thx
"Sum" problems
Unfortunately still not clear. Please send your report template (a mrt file, can be saved in Stimulsoft Reports.Net Designer) to support[at]stimulsoft.com.wrote:I need to calculate the SUM of my "total" column. According to the example here, I need a total of 30$ (20 + 10).
We'll help you as soon as possible, it seems not a difficult question, but we need to understand the requirement first.
Thank you.
"Sum" problems
header
grouping (group)
id ------- group -------- total ------- name sub-group
1 ------- 0001 -------- 20$ ------- x
1 ------- 0001 -------- 20$ ------- y
1 ------- 0001 -------- 20$ ------- z
End grouping (if sum here the total = 60$ !!!!!!!!!!!!!!!!!!!!! I need 20$ as a total)
footer
header
grouping (group)
id ------- group -------- total ------- name sub-group
1 ------- 0001 -------- 20$ ------- x
1 ------- 0001 -------- 20$ ------- y
1 ------- 0001 -------- 20$ ------- z
End grouping
footer(if sum here the total = 60$ !!!!!!!!!!!!!!!!!!!!! and it's not what i want !!!! i want 20$)
header
grouping (group)
id ------- group -------- total ------- name sub-group
1 ------- 0001 -------- 20$ ------- x
1 ------- 0001 -------- 20$ ------- y
1 ------- 0001 -------- 20$ ------- z
End grouping
footer
if sum here the total = 40$ !!!!!!!!!!!!!!!!!!!!! WRONG again !!! it gives me the total of the last 2 rows
"Sum" problems
Hello!
Please create in report dictionary two variables: GroupValue and PrevID.
After then in BeginRenderEvent of GroupHeaderBand write following code:
After then in RenderingEvent of GroupHeaderBand write following code:
After then in total text component you need type:
Thank you.
Please create in report dictionary two variables: GroupValue and PrevID.
After then in BeginRenderEvent of GroupHeaderBand write following code:
Code: Select all
GroupValue = 0;
PrevID = -1;
Code: Select all
if (PrevID == -1 || PrevID != MyDataSource.ID)
{
PrevID = MyDataSource.ID;
GroupValue += MyDataSource.Value;
}
Code: Select all
{GroupValue}
"Sum" problems
All riiight
i found a solution and i don't need a SUM property, i use Variables, pure & simple (var1 += var2)
thx anyways !
i found a solution and i don't need a SUM property, i use Variables, pure & simple (var1 += var2)
thx anyways !