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

Graph results don't display with StateServer

2 Answers 51 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Charles
Top achievements
Rank 1
Charles asked on 31 Dec 2015, 03:24 PM

I'm currently using the legacy reportviewer and have modified the session state to use stateserver. All reports were running fine just prior to this update. After this update, for most of my reports, I've been able to just add the needdatasource event within the report itemdatabinding event and the results work fairly well (as long as they're serializable).

 

I have a report with a graph in it, which has its own needdatasource. I've performed the same operation with it default constructor > report itemdatabinding in which I find the graph item and add the needdatasource event > needdatasource event runs with all appropriate parameters passed in. I don't receive an error, but no results are displayed on the graph. Within the needdatasource the parameters of the sqldatasource are updated and applied to the graphs datasource.

 

I've added in a separate graph itemdatabinding event after the report binding, but the results are the same with no data displayed. All of the events, default constructor > report databinding > graph databinding > graph needdatasource run and seem to apply the parameters as needed.

 

Any idea of what the problem could be or at least how I can debug this issue?

2 Answers, 1 is accepted

Sort by
0
Charles
Top achievements
Rank 1
answered on 31 Dec 2015, 04:04 PM

After working on this issue for hours and finally posting on this thread, I, of course, figured out the solution almost immediately. Figures.

 

In case anyone comes across this issue, here's the solution:

In needdatasource, before this.graphobject.datasource =....worked fine before the session modification. Now, I need to retrieve the graphobject by:

1. dataitem = (Telerik.Reporting.Processing.DataItem)sender.

2. graphobject = (Telerik.Reporting.Graph)dataitem.ItemDefinition

3. graphobject.Datasource = ...

0
Nasko
Telerik team
answered on 01 Jan 2016, 09:45 AM
Hello Charles,

You are correct, the fields representing the report items in the Report class should not be used in the report events. Instead, the report item should be taken from the Items collection of the report. Consider the examples provided in the Design Considerations for Out-proc Session State help article.

Regards,
Nasko
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Charles
Top achievements
Rank 1
Answers by
Charles
Top achievements
Rank 1
Nasko
Telerik team
Share this question
or