I need to perform a filter to my existing XtraReport and I want to see only some specific records which I have their ID's.
When I execute following code it is applied successfully.
XtraReportOrder report = new XtraReportOrder();
report.FilterString = "orderId IN ('11092', '11093')";
report.ShowPreviewDialog();
I want to use sth like this,
report.FilterString = "orderId IN ("+MyList.ToConvertSthConvinient+")";
You can use a combination of String.Join
, LINQ and the string interpolation feature:
report.FilterString = $"orderId IN ({String.Join(", ", MyList.Select(id => $"'{id}'"))})";