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

Session State w/ ObjectDataSource

1 Answer 86 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Joe
Top achievements
Rank 1
Joe asked on 02 Apr 2014, 08:21 PM
Hello,

I'm migrating a set of reports from InProc session state to SQL Server sessions state (and have read the design considerations document at least 40 times.)  I'm using an object data source in a report and was wondering if someone could clarify if I understand correctly

1)  ObjectDataSource parameters must be primitive types.  i.e., I can not assign a "ReportCriteria" object as a parameter, but must assign ReportCriteria.StartDate, ReportCriteria.EndDate, ReportCriteria.ZipCode, etc as individual parameters?

2)  If I add a sorting binding to a column header and click it, the DataObjectMethod that my ObjectDataSource is assigned to will be called again and I have to take the database hit two times?   If this is the case and not a misunderstanding on my part, is there a reccommended approach to not hit the database multiple times?

3)  Are there any real world examples available anywhere in the documentation or videos?  I feel like everything I see works against the "best case" scenarios of clean data and no weird customer requirements?

Many thanks!

Joe

1 Answer, 1 is accepted

Sort by
0
Nasko
Telerik team
answered on 07 Apr 2014, 03:57 PM
Hello Joe,

1. You are correct it is not possible to assign a "ReportCriteria" object as a parameter to the ObjectDataSource. Parameters should be primitive types, such as Boolean, DateTime, Integer, Float, String.
2. The sorting is achieved using a navigate to report action, which calls the same report multiple times. Thus, the data source will also be hit multiple times and this is not something that can be avoided.
3. We believe that in general it is better to try and clean your data and also eliminate any odd requirements than to create a solution which does not follow good practices. Thus, in our examples and snippets we tried to implement simple scenarios which can be easily understood and applied to the bigger picture and also best practices.

Regards,
Nasko
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

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