Create subtotals

Stimulsoft Reports.NET discussion
Post Reply
mrapi
Posts: 282
Joined: Sat Dec 20, 2008 1:08 am

Create subtotals

Post by mrapi »

Hi,it is possible to create such subtotals as in image,for every group?
img.png
img.png (2.22 KiB) Viewed 1918 times
thanks
Lech Kulikowski
Posts: 7341
Joined: Tue Mar 20, 2018 5:34 am

Re: Create subtotals

Post by Lech Kulikowski »

Hello,

Depends on DataStructure. You can try to use master-detail construction with grouping to implement it.
Please send us a test data, we will try to prepare a sample for you.

Thank you.
mrapi
Posts: 282
Joined: Sat Dec 20, 2008 1:08 am

Re: Create subtotals

Post by mrapi »

Hi
I've attached some sample data and a staring report
thanks
Attachments
data.zip
(2.18 KiB) Downloaded 156 times
Lech Kulikowski
Posts: 7341
Joined: Tue Mar 20, 2018 5:34 am

Re: Create subtotals

Post by Lech Kulikowski »

Hello,

Please check the modified report in the attachment.

Thank you.
Attachments
Report_modified.mrt
(11.23 KiB) Downloaded 247 times
mrapi
Posts: 282
Joined: Sat Dec 20, 2008 1:08 am

Re: Create subtotals

Post by mrapi »

great.

recap:
main data source: tb, 3 columns: ID(long),PROC(int),VALUE(int)
add +2 report internal datasources(Data from other DataSource): DataSource1 and DataSource2,in both set tb as main source
DataSource1 add 1 columns ID(long),Add Group(in edit datasouce->Groups) by col ID,add relation Relation1 by ID between tb as child and DataSource1 as parent
DataSource2 add 3 columns ID(long),PROC(int),VALUE.Sum(int)-added as agregate func SUM(in edit datasouce->Results),Add Group(in edit datasouce->Groups) by cols ID+PROC,add relation Relation2 by ID between DataSource2 as child and DataSource1 as parent
on report add 3 bands:
first(DataBand1) set to DataSource1,add one text set to:{DataSource1.ID}
second (DataBand2) set to tb,set Master Component to DataBand1,set relation to Relation1,add 2 text set to: {tb.PROC} and {tb.VALUE}
third(DataBand3) set to DataSource2,set Master Component to DataBand1,set relation to Relation2,add 1 text set to: {DataSource2.PROC} - {DataSource2.VALUE_SUM}

thanks
Lech Kulikowski
Posts: 7341
Joined: Tue Mar 20, 2018 5:34 am

Re: Create subtotals

Post by Lech Kulikowski »

Hello

We are always glad to help you!

Thank you.
Post Reply