Dynamic grouping of records after generation of report

Stimulsoft Reports.WEB discussion
Post Reply
User avatar
Buknoy Palaboy
Posts: 48
Joined: Fri Jun 22, 2012 1:34 am
Location: Philippines

Dynamic grouping of records after generation of report

Post by Buknoy Palaboy »

Hi Stimulsoft team,

Is it possible to add a group band on a report after it is generated and assign a specific column to group retrieved rows?
If so, what is the command to use? Is there any sample c# code you can give us so that we can look at it and check if
it satisfies our requirement.

example:
* retrieve list of customers info
* now that I see all my customers, I want to see customers based on their location like what city they are in and group them
* or I want to see all customers grouped by their birthdate...etc

Please do tell if this is achievable.

Regards and thanks,
Buknoy
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Dynamic grouping of records after generation of report

Post by Alex K. »

Hello,

As a way, you can use interactions. Please see the sample report in attachment.

Thank you.
Attachments
1962.DrillDownSorting.mrt
(23.43 KiB) Downloaded 421 times
User avatar
Buknoy Palaboy
Posts: 48
Joined: Fri Jun 22, 2012 1:34 am
Location: Philippines

Dynamic grouping of records after generation of report

Post by Buknoy Palaboy »

Hi Aleksey,

Thank you for the reply. Sorry if my inquiry is not clear. What I mean to say is, after I embeded the stimulsoft report object to an MVC view and
render or generate the report, what I want to do is add a grouping during runtime to group customers based on their "ContactTitle" for example,
then a new page will be generated for each group of "ContactTitle." Now if I want to change the grouping again like if region was added on the list of
displayed field, I would see list of customers group by "region". This is all done during runtime and not at the designer application.

Can this be done programmatically using Visual Studio 2010 on an MVC view?

Regards and thanks,
Buknoy
User avatar
Buknoy Palaboy
Posts: 48
Joined: Fri Jun 22, 2012 1:34 am
Location: Philippines

Dynamic grouping of records after generation of report

Post by Buknoy Palaboy »

Any updates, please anyone...
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Dynamic grouping of records after generation of report

Post by HighAley »

Hello.
Buknoy Palaboy wrote:Thank you for the reply. Sorry if my inquiry is not clear. What I mean to say is, after I embeded the stimulsoft report object to an MVC view and
render or generate the report, what I want to do is add a grouping during runtime to group customers based on their "ContactTitle" for example,
then a new page will be generated for each group of "ContactTitle." Now if I want to change the grouping again like if region was added on the list of
displayed field, I would see list of customers group by "region". This is all done during runtime and not at the designer application.

Can this be done programmatically using Visual Studio 2010 on an MVC view?
You could create group at design time and set its Enabled property to false.
Then in your code you could set its condition and enable it.

Code: Select all

StiGroupHeaderBand groupHeader = report.GetComponentByName("GroupHeaderBand1") as StiGroupHeaderBand;
groupHeader.Enabled = true;
groupHeader.Condition = new StiGroupConditionExpression("{Customers.Region}");
Thank you.
User avatar
Buknoy Palaboy
Posts: 48
Joined: Fri Jun 22, 2012 1:34 am
Location: Philippines

Dynamic grouping of records after generation of report

Post by Buknoy Palaboy »

Hi Aleksey,
Your solution works like a charm. Good job. Thanks! :grinder:

Regards and Thanks,
Buknoy
Andrew
Posts: 4109
Joined: Fri Jun 09, 2006 3:58 am

Dynamic grouping of records after generation of report

Post by Andrew »

Hello,

Great!

Have a nice day!
Thank you.
Post Reply