This is a migrated thread and some comments may be shown as answers.

Case insensitive Grouping

1 Answer 118 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Charlie
Top achievements
Rank 2
Charlie asked on 28 Aug 2012, 04:21 PM
I have created a report that gets processed at run time (there's almost nothing in the designer).
We allow our users to configure how data is grouped in the report (fieldText is the name of a column in the DataTable the report is bound to).
The trouble is, I get separate groups for "Washington" and "washington".
Is there a way to have that Grouping be case insensitive?
Thank you.


Here is the code:
string expr = string.Format("Fields.{0}", fieldText);
 
myGroup.Groupings.AddRange(new Telerik.Reporting.Grouping[]
{
    new Telerik.Reporting.Grouping(expr))
});

1 Answer, 1 is accepted

Sort by
0
Elian
Telerik team
answered on 03 Sep 2012, 01:25 PM
Hello Charlie,

Instead of using "=Fields.FieldName", you can use "=ToLower(Fields.FieldName)". For more complicated cases when there isn't a built-in expression function, you can always use your own custom function, that will return the grouping criteria. 
 
Regards,
Elian
the Telerik team

BLOGGERS WANTED! Write a review about Telerik Reporting or the new Report Designer, post it on your blog and get a complimentary license for Telerik Reporting. We’ll even promote your blog and help bring you a few fresh readers. Yes, it’s that simple. And it’s free. Get started today >

Tags
General Discussions
Asked by
Charlie
Top achievements
Rank 2
Answers by
Elian
Telerik team
Share this question
or