This is a migrated thread and some comments may be shown as answers.

Trouble adding Groups to a Report with a Table

3 Answers 479 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Kevin
Top achievements
Rank 1
Kevin asked on 06 Mar 2018, 04:44 AM

I have a report that has a table that is populated from a stored procedure showing sales by contract - one line per contract.

I need to add 2 levels of groups so that I can show Sales by Salesperson within Shop with a page break on Shop and totals at both the Salesperson and Shop levels.

I have tried adding 2 Groups and moved the table to the last Group Header section but the grouping doesn't seem to be doing anything.  The report is not showing any Shop or Salesman details.  The design is shown in the attached image.

 

What am I missing?

Regards

Kevin

 

3 Answers, 1 is accepted

Sort by
0
Todor
Telerik team
answered on 08 Mar 2018, 04:56 PM
Hello Kevin,

An easy way to achieve the requirement is to add two Report Groups (check grouping data) - the outer one grouping over Shop, the inner - over Salesperson.
To have each shop on a different page I suggest setting the Shop group GroupFooterSection PageBreak property to 'After' - after each shop group the report will continue to render on the next page.

The name of the Shop could be displayed in the Shop GroupHeaderSection, and the name of the Salesperson - in the Salesperson GroupHeaderSection (will be displayed once per group).

The Totals could be displayed in the corresponding GroupFooterSections - use Sum aggregate function.

The detail data could be displayed directly in the detail section (i.e. without Table), since the grouping is already done with the introduced Report Groups.

I have attached a sample report demonstrating the approach. It uses inline CsvDataSource. The Groups are colored to be easily distinguished from one another.

Regards,
Todor
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Kevin
Top achievements
Rank 1
answered on 13 Mar 2018, 01:16 AM

Hi Todor

Thanks for your reply. 

I have added 2 Groups under the Report properties, one for Fields.Shopname and one for Fields.SalespersonName, but am not sure how to link the GroupHeaderSections to SalespersonName and Shopname.  Is this using Bindings?

When I run the report I don't have any Shop or Salesperson details displaying.  I added a text box in each GroupHeaderSection e.g. for ShopName the field is "= First(Fields.ShopName)".  I also placed the table in the SalespersonName's GroupHeaderSection.

What am I missing?

I wasn't sure how to open the example you supplied.

Regards

Kevin

 

0
Todor
Telerik team
answered on 14 Mar 2018, 04:03 PM
Hi Kevin,

The example can be opened with the Standalone Report Designer.
You can also convert it to a .cs report as explained here, and open it with the Visual Studio Report Designer.

If you need further help, I suggest you to open a support ticket where you would be able to attach your report.
After investigating the report locally we might come up with more specific advices.

Regards,
Todor
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Kevin
Top achievements
Rank 1
Answers by
Todor
Telerik team
Kevin
Top achievements
Rank 1
Share this question
or