Case-insensitive sorting or custom function for sort
-
- Posts: 18
- Joined: Tue Aug 09, 2011 10:35 am
Case-insensitive sorting or custom function for sort
Is there anyway to have the sorting be case-insensitive?
Is there anyway to have specify a function for sorting?
Currently, I am trigger sorting by the StiDataBand sort property.
At one point I thought there was a way to sort the data rows directly and then have the report just display in the current order, but I cannot locate that information any longer.
Is there anyway to have specify a function for sorting?
Currently, I am trigger sorting by the StiDataBand sort property.
At one point I thought there was a way to sort the data rows directly and then have the report just display in the current order, but I cannot locate that information any longer.
Re: Case-insensitive sorting or custom function for sort
Hello,
You can use the following expression in the sort condition:
Thank you.
You can use the following expression in the sort condition:
Code: Select all
ToLowerCase(ColumnName)
-
- Posts: 18
- Joined: Tue Aug 09, 2011 10:35 am
Re: Case-insensitive sorting or custom function for sort
I do not understand...
In AS3, I have the following code.
band.sort = [ "ASC", "LastName", "ASC", "FirstName" ];
If I change "ASC" to ToLowerCase("LastName") the code does not compile (not that I expected it would).
So how would I code this and use ToLowerCase("LastName") and ToLowerCase("FirstName") in AS3?
In AS3, I have the following code.
band.sort = [ "ASC", "LastName", "ASC", "FirstName" ];
If I change "ASC" to ToLowerCase("LastName") the code does not compile (not that I expected it would).
So how would I code this and use ToLowerCase("LastName") and ToLowerCase("FirstName") in AS3?
Re: Case-insensitive sorting or custom function for sort
Hello,
Your code should look like this:
Thank you.
Your code should look like this:
Code: Select all
band.sort = [ "ASC", "ToLowerCase(LastName)", "ASC", "ToLowerCase(FirstName)" ];
-
- Posts: 18
- Joined: Tue Aug 09, 2011 10:35 am
Re: Case-insensitive sorting or custom function for sort
That makes the program compile correctly, but there seems to be a problem with the actually sort.
I am trying to sort LastName, then FirstName.
For some reason, the LastName with the attached data sorts:
Oliveri, King, Thomas, Vulcani
I would expect:
King, Oliveri, Thomas, Vulcani
I also need a way to sort a column of data that is number-number (1-1, 2-1, 3-1, ... 10-1, 11-1). This does not sort correctly either...
I am trying to sort LastName, then FirstName.
For some reason, the LastName with the attached data sorts:
Oliveri, King, Thomas, Vulcani
I would expect:
King, Oliveri, Thomas, Vulcani
I also need a way to sort a column of data that is number-number (1-1, 2-1, 3-1, ... 10-1, 11-1). This does not sort correctly either...
- Attachments
-
- Data.csv
- (1.25 KiB) Downloaded 639 times
-
- OrderSummaryWithPoses.mrt
- (38.24 KiB) Downloaded 675 times
Re: Case-insensitive sorting or custom function for sort
Hello,
Can you please send a test data which we can use for your report.
Thank you.
Can you please send a test data which we can use for your report.
Thank you.
-
- Posts: 18
- Joined: Tue Aug 09, 2011 10:35 am
Re: Case-insensitive sorting or custom function for sort
Sorry for not being clear...Data.csv is the test data and the report is the OrderSummaryWithPoses.mrt. You don't have the AS3 code but the example in this thread is what I am using.
Re: Case-insensitive sorting or custom function for sort
Hello,
Can you please send us a test data for your report.
As a way, you can use the following code in the BeforePrint event of the page for saving data as xml:
Order.DataTable.DataSet.WriteXmlSchema("e:\\data.xsd");
Order.DataTable.DataSet.WriteXml("e:\\data.xml");
Thank you.
Can you please send us a test data for your report.
As a way, you can use the following code in the BeforePrint event of the page for saving data as xml:
Order.DataTable.DataSet.WriteXmlSchema("e:\\data.xsd");
Order.DataTable.DataSet.WriteXml("e:\\data.xml");
Thank you.
-
- Posts: 18
- Joined: Tue Aug 09, 2011 10:35 am
Re: Case-insensitive sorting or custom function for sort
So I have to add "BeforePrint" event listeners to the Viewer to do this or some other piece of the StiReporting package?
And the above works in Flex?
And the above works in Flex?
Re: Case-insensitive sorting or custom function for sort
Hello,
The code in events is not supported in flex version. As a way, you can try to run the standalone designer and save data as .xml or you can use other methods for save and sent us a test data which we can you use in your report for testing.
Thank you.
The code in events is not supported in flex version. As a way, you can try to run the standalone designer and save data as .xml or you can use other methods for save and sent us a test data which we can you use in your report for testing.
Thank you.