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

Sessionstate = SQLServer, Reporting, parameters

3 Answers 114 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Alex White
Top achievements
Rank 1
Alex White asked on 27 Jul 2009, 01:12 PM
Hi,

I changed my web project over to using a state server rather than inProc e.g.

sessionState

 

 

mode="SQLServer"

 


Once I implemented this my parametered reports failed, ok not too much of a problem I thought, I will use parameters to pass the information into the report, and use the NeedDataSource event to collect the correct data, this has worked for everything that is bound to controls, but on a lot of my reports I programmically set the Values of some of the text boxes, this cannot be done within the NeedDataSource event because at this point the textboxes are already set (I think?),

so in the past I was able to do the following

this.txtCompany.Value ='this is a test'


in the constructor, but this now does not work because this work is now done in the NeedDataSource event, so I have tried the following

Telerik.Reporting.Processing.TextBox MyCompany = (Telerik.Reporting.Processing.TextBox)txtCompany;

MyCompany.Text = 'this is a test'

 

;

of course the Telerik.Reporting.Processing.TextBox is different to Telerik.Reporting.TextBox so it does not work.

does anyone have a solution to this problem, specifically programmically assigning values to textboxes on reports in any event after the constructor, I have maybe 20 textboxes on each report so setting an event for each textbox would be slow.


thanks in adavnce.


Alex


 





3 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 27 Jul 2009, 02:10 PM
Hi Alex,

Please review the following KB article that elaborates on Telerik Reporting and Out-Proc Session usage:
Design Considerations for Out-Proc Session State.

Best wishes,
Steve
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Alex White
Top achievements
Rank 1
answered on 27 Jul 2009, 02:22 PM
Hi,

Unfortunately that document does not solve my problem, all I need to do is be able to set the actual text values of textboxes on the report with specific data, these textboxes are unbound, all I need to know is which point in the event tree is the point where I can make modifications to the report to update the textboxes. This needs to happen either in the NeedDataSource event or an event that is fired after that event.

The inProc sessions have caused such a big issue with our site due to user logging in for whole days without changing anything for hours at a time that we had to move away from inProc sessions within IIS, but this change has broken every report because I used the constructor as a way to get the parameters into the report.

Regards


Alex

0
Alex White
Top achievements
Rank 1
answered on 27 Jul 2009, 03:07 PM
Hi,

I have found a way around the problem, the fix/hack is this

top of the report class.

 

 

using System.Web.SessionState;

 


in the parameter less constructor

System.Web.HttpContext.Current.Session["MyPrimaryKey"].ToString();

 

 

using session variables to get the parameters into the class, using the session variable throughout the code works.


thanks

Alex 

Tags
General Discussions
Asked by
Alex White
Top achievements
Rank 1
Answers by
Steve
Telerik team
Alex White
Top achievements
Rank 1
Share this question
or