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

interactive sorting without table?

3 Answers 139 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Varun
Top achievements
Rank 1
Varun asked on 22 Dec 2011, 11:06 PM
Hi,
  Is it possible to have interactive sorting working without using a table? I get Errors like: AvailableValues.ValueMember is not specified for parameter 'SortBy'.

Already referenced:
http://www.telerik.com/community/forums/reporting/telerik-reporting/click-column.aspx
http://www.telerik.com/community/forums/reporting/telerik-reporting/interactive-sorting.aspx

Thanks,

3 Answers, 1 is accepted

Sort by
0
IvanY
Telerik team
answered on 27 Dec 2011, 04:52 PM
Hi,

Yes, you can have interactive sorting on the whole report. You actually almost made it, but you have to set the ValueMember property of your report Parameter as the error message proposed. You can do this by simply clicking on Telerik -> Report Explorer -> expand Parameters -> right click SortBy (your parameter) -> Edit Parameter -> expand AvailableValues and in there you will see the ValueMember property. This is the main value for your Parameter which you can use to filter on or to reference it in a TextBox for example. You can check our Report Parameters help article for more information.

As for the forum threads - they are not connected to your problem as the first is for the Chart and the second is for our Crosstab.

Regards,
IvanY
the Telerik team

Q3’11 of Telerik Reporting is available for download. Register for the What's New in Data Tools webinar to see what's new and get a chance to WIN A FREE LICENSE!

0
Varun
Top achievements
Rank 1
answered on 19 Jan 2012, 10:21 PM
Hi,
 I am having some problem with sorting of columns. I am creating the report in the Controller of my MVC application, fetching the data and assigning it as datasource to the report. Therefore the datasource is not set inside the report itself and this is how it has to be done due to architecture and security considerations.

When I click on the column to sort, it looks like a new instance of the same report is created and rendered back. Since I did not create the new instance in the controller, I have no way of giving the new report with the datasource it needs.

Is there a way I can pass the datasource of my original report to the new report instance? Everything is cached after all.

Thanks,
Varun
0
IvanY
Telerik team
answered on 20 Jan 2012, 06:13 PM
Hi Varun,

As a side note I have to mention that it is not the job of the Controller to create the report, but of the Model. The Controllers job is to handle the users input and to convert the event into appropriate user action, understandable for the Model. On the other side the Model manages the behavior and data of the application domain. Therefore you should create your report in the Model.

As for your issue, it is not clear how you are managing the interactive sorting. I can advise you to follow this pattern: define an Action that navigates to the same report and passes a parameter indicating by which column to sort. Then you can use that parameter in the sorting criteria of the report. You can find attached projects and additional explanations in this forum thread.

Regards,
IvanY
the Telerik team

Q3’11 of Telerik Reporting is available for download. Register for the What's New in Data Tools webinar to see what's new and get a chance to WIN A FREE LICENSE!

Tags
General Discussions
Asked by
Varun
Top achievements
Rank 1
Answers by
IvanY
Telerik team
Varun
Top achievements
Rank 1
Share this question
or