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

Static/Shared variables

1 Answer 137 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Justin Lee
Top achievements
Rank 1
Justin Lee asked on 20 Jul 2011, 04:17 PM

I have a report that uses ObjectDataSources, and is displayed in an ASP.Net application.
The report shows a list of objects, and there is a sub report for each object.

The datasource method for the sub report retrieves 2 lists (List A and List B) from the database, and converts the 2 lists into 1 list (which is returned as the datasource of the sub report)   List A is specific to each sub report, but List B will be the same for every sub report.

For better performance, is there a way to only retrieve List B once, and somehow pass it the sub report's datasource method, so it doesn't have to retrieve it for every sub report?

My first thought is to store List B in a static variable - but since the report is in an ASP.Net application, the variable would be shared between all sessions correct? (List B will be different for different clients)

Is there any solution for this senario? Let me know if you need me to explain it better.

Thanks,
Justin

1 Answer, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 21 Jul 2011, 05:25 PM
Hi Justin Lee,

We are not sure we have correctly understood your scenario. In order to try to give you an appropriate advice we will appreciate if you elaborate further on your goal.

All the best,
Peter
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Tags
General Discussions
Asked by
Justin Lee
Top achievements
Rank 1
Answers by
Peter
Telerik team
Share this question
or