Grouping with Data from Other Data Source

Stimulsoft Reports.NET discussion
Post Reply
Brendan
Posts: 309
Joined: Sun Jul 16, 2006 12:42 pm
Location: Ireland

Grouping with Data from Other Data Source

Post by Brendan »

Hi,

Is it possible to use an expression or calculated column when using the 'Groups' tab while designing a 'Data from other Data Source'?

For example, lets say there is a list of students with different ages ranging from 18+
If I wanted to categorize them I could use a calculated column within the main Data source to do something like:

Code: Select all

{(Student.Age > 40 ? "40 and Over" : (Student.Age > 30 ? "31 - 40" : (Student.Age > 20 ? "21 - 30" :"0 - 20")))}
This would produce 1 or 4 groups
40 and Over
31 - 40
21 - 30
0 - 20

For a standard listing this would print:

Code: Select all

Age	Group	Name
18	 0-20	Student 1
32	31-40	Student 2
36	31-40	Student 3
39	31-40	Student 4
26	21-30	Student 5
...	etc...	etc....

I'd like to be able to take this data set and use it for grouping with the 'Data from other Data Source' so that I could select the Calculated Column for AgeGroup from the Groups tab or else specify an expression like above.

Then on the Results tab I could run a count aggregate for studentID leaving me with a data source of

Code: Select all

AgeGroup, Total Count
 0-20		1
21-30		1
31-40		3

This data could then be plotted on the Chart component using a pie chart or bar charts.


Is there any way to achieve the above without having to modify the original data set registered with the report?
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Grouping with Data from Other Data Source

Post by Edward »

Hi Brendan,

Thank you for the suggestion. We will discuss once more if it possible to add this feature to 'Data Based on Other DataSource' and let you know in this topic.

Thank you.
Brendan
Posts: 309
Joined: Sun Jul 16, 2006 12:42 pm
Location: Ireland

Grouping with Data from Other Data Source

Post by Brendan »

Thanks Edward.

Have you any recommendation on a workaround for this. Would it be to just try and handle the processing on the server side or in the client application before registering a data source?
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Grouping with Data from Other Data Source

Post by Edward »

Hi Brendan,

You suggested a very useful feature, but realization of this feature requires quite a lot efforts from our side. We have added it into our to do list but I can not say how much time is required.

Thank you.
Post Reply