Hi,
I have seen this post somewhere..
Please use following code in BeforeRender Event of DataBand2 in StimulReport.Net:
Code:
DataBand2.Sort = new string[] {"ASC","ProductName","DESC","UnitPrice"};
DESC - sorting in descending order
ASC - sorting in ascending order
Address, UnitPrice - are Columns from your Datasource.
Thanks.
I am new here..how can i access the BeforeRender event. I am using StiReportWeb.
Thank you.
Runtime Sorting
Runtime Sorting
If you want to set sort of databand in runtime from your web application, you may use the following code on, for example, Page_Load event:
If you want to set sort of databand in the designer your can double click on databand and choose sort tab.
If you select databand and select right button on property grid, you see all events of databand, including BeginRenderEvent.
Thank you.
Code: Select all
StiReport report = StiWebReport1.GetReport();
StiDataBand databand = (report.Pages[0].Components["DataBand2"] as StiDataBand);
databand.Sort = new string[] { "ASC", "UnitPrice" };
StiWebViewer1.Report = report;
If you select databand and select right button on property grid, you see all events of databand, including BeginRenderEvent.
Thank you.
Runtime Sorting
Good it works..
2 Question.
1. The event window..so small got other editor or other way ?
2. Can I code in VB ?
Thank you.
2 Question.
1. The event window..so small got other editor or other way ?
2. Can I code in VB ?
Thank you.
Runtime Sorting
If you choose a report in the property grid you may set "Script Language" to VB.
Concerning event window, you can resize it.
Thank you.
Concerning event window, you can resize it.
Thank you.
Runtime Sorting
Ok Thank you.