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

Interactive Sorting DataSource Binding Error

4 Answers 52 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Zach
Top achievements
Rank 1
Zach asked on 20 Mar 2014, 11:14 AM
Hi,

I'm trying to setup my report with interactive sorting.  I followed KB article below for setting that up but when I run my report, I get the error "The expression contains undefined function call SetSortingDirection()."  The report designer sees the method 'SetSortingDirection' but I'm wondering if I'm passing the wrong parameter to the method.  The only thing different I'm doing from the article is that I'm not doing this with a table but with the full report itself.

http://www.telerik.com/support/kb/reporting/styling-and-formatting-reports/details/how-to-add-interactive-sorting-to-a-table-item-

Thanks,
Zach

4 Answers, 1 is accepted

Sort by
0
Nasko
Telerik team
answered on 25 Mar 2014, 07:56 AM
Hello Zach,

Check the following KB article that elaborates on the known reasons for this problem: The expression contains undefined function call MyUserFunction() error.

In your case the SetSortingDirection()​ user function expects a Processing.ReportItem dataItem but you said you are passing the whole report. You can try changing the user function parameter to Telerik.Reporting.Processing.Report.

Regards,
Nasko
Telerik
 

Build cross-platform mobile apps using Visual Studio and .NET. Register for the online webinar on 03/27/2014, 11:00AM US ET.. Seats are limited.

 
0
Zach
Top achievements
Rank 1
answered on 25 Mar 2014, 02:10 PM
Thanks Nasko.  That helped get me to the point where I can call the method correctly, but now I can't figure out how to access the Sortings properties, or in my case the Groupings property.  The kb article in my original post is using the method parameter dataItem in order to set the sort direction.  However, the Telerik.Reporting.Processing.Report object does not contain any of those properties.

Zach
0
Accepted
Stef
Telerik team
answered on 28 Mar 2014, 03:18 PM
Hi Zach,

You can find attached a sample report where we have applied an interactive sorting on a report layout with one dynamic group. The report is created with VS Integrated Report Designer and Telerik Reporting Q1 2014 version 8.0.14.311.

The steps to create the report are similar to those for the Table item in the How to add interactive sorting to a Table item? KB article. The only change is that user functions(SetSortingDirection) are adjusted to work with the processing report, not the a processing Table item(data item). We access the report's groups and their Sortings collection within the user function. To get a better look on the report layout and settings, open  the Group Explorer.

I hope this helps you.

Regards,
Stef
Telerik
 

Build cross-platform mobile apps using Visual Studio and .NET. Register for the online webinar on 03/27/2014, 11:00AM US ET.. Seats are limited.

 
0
Zach
Top achievements
Rank 1
answered on 28 Mar 2014, 06:52 PM
Thank-you Stef.  That worked perfectly.
Tags
General Discussions
Asked by
Zach
Top achievements
Rank 1
Answers by
Nasko
Telerik team
Zach
Top achievements
Rank 1
Stef
Telerik team
Share this question
or