Hi hi hi
How is sort based on Codition or Expression?
If Possible Sort data based on Some Expression?
Following code is Example.
1. If field1.Text="A" then
DataBand1.Sort Ascending Based on field2.Text
Else if field1.Text="B" then
DataBand1.Sort Ascending Based on field3.Text
Else if field.Text="C" then
DataBand1.Sort Decending order Based on field4.Text
else
DataBand1.Sort Decending
Above code is possible or other way of sorting data in Dynamic
Please Provide Solution For that Problem.
Thanks of Advance.
Regards,
KMarimuthu.
How is Sorting based on Expression
-
- Posts: 101
- Joined: Wed Jul 26, 2006 8:03 am
- Location: CHENNAI-TN, INDIA
How is Sorting based on Expression
Marimuthu K
How is Sorting based on Expression
Please use following code in BeforeRender Event of DataBand2 in StimulReport.Net:KMarimuthu wrote:Hi hi hi
How is sort based on Codition or Expression?
If Possible Sort data based on Some Expression?
Following code is Example.
1. If field1.Text="A" then
DataBand1.Sort Ascending Based on field2.Text
Else if field1.Text="B" then
DataBand1.Sort Ascending Based on field3.Text
Else if field.Text="C" then
DataBand1.Sort Decending order Based on field4.Text
else
DataBand1.Sort Decending
Above code is possible or other way of sorting data in Dynamic
Please Provide Solution For that Problem.
Thanks of Advance.
Regards,
KMarimuthu.
Code: Select all
DataBand2.Sort = new string[] {"ASC","ProductName","DESC","UnitPrice"};
ASC - sorting in ascending order
Address, UnitPrice - are Columns from your Datasource.
Thanks.