Question

I have a active report and I need to group it on my country attribute. I have been looking around on the active reports API and came across grouping. Is this the best way to do this and how do I go about doing this? Thanks

Was it helpful?

Solution

@ewein,

Grouping is pretty simple and straightforward in ActiveReports. Let us consider your example where you wish to group your report on Country. Let us say we are binding the report to NorthWind database and you wish that for each country you want to see the associated cities.

In order to do this, you first need to add a Groupheader section to your report. Next you need to set the datasource for the report. Once you do this, you can go to the groupheader proerties and set its datafield property to "Country". Also place a textbox in the groupheader with its datafield set to "Country". Finally you will need to place a textbox in the detail section and set its datafield to city. Now when you will preview your report, you will get all the associated cities for each Country.

I will suggest you to check this link from the ActiveReports documentation which will clarify on this further. It is also worth taking a look at this blog article which shows grouping with some additional feature. In addition to this, you may want to check all the blog articles present to get more information on different ActiveReports features.

Thanks, Sankalp

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top