If Possible to dynamic sorting column based on Header Band Heading ?

Stimulsoft Reports.NET discussion
Post Reply
MARIMUTHU K
Posts: 101
Joined: Wed Jul 26, 2006 8:03 am
Location: CHENNAI-TN, INDIA

If Possible to dynamic sorting column based on Header Band Heading ?

Post by MARIMUTHU K »

Hi Stimul Team,

Congrats ur Urgent Help.


Already We worked LGX Report Tool, Its available dynamic sorting Header Band Heading.
Stimulsoft,
If Possible to dynamic sorting Header Band Heading ?

For Example,
If click Name Column then Ascending order and click again Name column should be Descending order.



Becaze Its Very useful in our End User.


Thanks in Advance,
Marimuthu K
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

If Possible to dynamic sorting column based on Header Band Heading ?

Post by Edward »

In the current version of the Stimulsoft Reports.Net engine this can be achieved only "by hand" with script, Tag property of the StiText component (which can store additional information about Column Name which is sorted) ClickEvent and full re-rendering of the report.

But such a component as 'Table' is in our plans. We plan to issue such a component in one of the future releases of the Stimulsoft Reports.Net.

Thank you.
MARIMUTHU K
Posts: 101
Joined: Wed Jul 26, 2006 8:03 am
Location: CHENNAI-TN, INDIA

If Possible to dynamic sorting column based on Header Band Heading ?

Post by MARIMUTHU K »


We did Following code in Column GetTagEvent

DataView dv = new DataView(this.Dictionary.DataSources["Table1"]);
//apply a sort
dv.Sort = "Table1.first_nm Desc";

But it throw invalid arguments Error.

Please provide sample code.


thanks in Advance
Marimuthu K
Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

If Possible to dynamic sorting column based on Header Band Heading ?

Post by Vital »

Please use following code in ClickEvent of required component:
StiText text = sender as StiText;
StiReport report = text.Report;
StiDataBand dataBand = report.GetComponents()["DataBand1"] as StiDataBand;
dataBand.Sort = new System.String[] {
"DESC",
"CompanyName"};

report.Render(false);
Thank you.
MARIMUTHU K
Posts: 101
Joined: Wed Jul 26, 2006 8:03 am
Location: CHENNAI-TN, INDIA

If Possible to dynamic sorting column based on Header Band Heading ?

Post by MARIMUTHU K »

This solution is working Preview, but not working in HTML Preview

Becaze we are using WebViewer in Webpage. If we use click then re direct to another Page.

Please kindly check and provide solution.


Thanks in Advance,
Marimuthu K
Post Reply