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

Silverlight Reporting Upgrade - ReportParameters are NULL

4 Answers 80 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Richard
Top achievements
Rank 1
Richard asked on 13 Aug 2015, 01:06 PM

Hi, 

 System Set UP : VS 2010 (I know, I know out of my control here), Silverlight 4 with Telerik Reports Upgrade Wizard to Q2 2012.

 

 I have been tasked with upgrading the reports in my project to the latest version. I have done this by using the Wizard which was pretty close to perfect but needed me to make a few changes to get it functional.

 

As part of the reports the existing software passes a load of parameters to the reports by using the event  

  public void BeginRender(RenderBeginEventArgs args)

 

I have debugged this and seen all of the properties being populated nicely. The problem occurs when actually in the report and trying to access some of the report parameters. All of the values are null and I cannot work out why?

 

I have a semi work around -: 

        void TNAnalysisReport_ItemDataBinding(object sender, EventArgs e)
        {           
            _aCollectionOfParameters = (sender as Telerik.Reporting.Processing.Report).Parameters;            
        }      

However this does not work when populating subreports.... I really need a fix as to why the parameter values are being populated but not passed? Is there anything I can check to see why?

Any pointers would be most appreciated.

 

4 Answers, 1 is accepted

Sort by
0
Richard
Top achievements
Rank 1
answered on 17 Aug 2015, 07:22 AM

Hi Telerik, 

 Any thoughts or pointers on how I can get a resolution to the parameters no longer being passed as they were?

Rich

0
Stef
Telerik team
answered on 18 Aug 2015, 09:05 AM
Hello Rich,

To get the parameters' values passed from the viewer you need to use them in expressions or access the processing report's Parameters collection. For more details check Understanding Events and Using Report Events.


If you need further help, please elaborate on the reason to access report parameters in the report and on the report definition.

Regards,
Stef
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
0
Richard
Top achievements
Rank 1
answered on 18 Aug 2015, 12:29 PM

Hi Stef, 

 Thanks for replying to this issue.

 I've been tasked with upgrading an existing app using Telerik Reports (v. 5.1.11.928)  and bringing its reports into a more manageable state as its been floundering for a while now. (v. 9.1.15.624).

 The previous version passes variables up to the server by using the old BeginRender method - when this has been called it seems that the properties automagically appeared back on the server once the -:

"InitializeComponent();"

Had been called, then the parameters seemed to magically appear in the Report->ReportParameters dictionary. Since upgrading the DLL's these values are no longer appearing and its caused a lot of problems with the set of reports I am dealing with. 

My current work around is to use the event -: this.ItemDataBinding

 Then accessing the sender object here I can get the reports parameters and store them locally -:

     this.Parameters = (sender as ReportItemBase).Report.Parameters; 

its not ideal but it seems to be working currently.  I guess my question is - What changed and is this way to do it now going forward?

 

0
Stef
Telerik team
answered on 21 Aug 2015, 09:03 AM
Hello Richard,

There are a lot of changes between Telerik Reporting Q2 2011 SP1 and Q2 2015 SP1. In general, there are several major changes that may concern your project:
It is recommended also to check the release notes of all major releases up to now - Release History. There are changes in the paging mechanism as of Q2 2012 and changes in the way parameters are handled as well - Understanding Events.

Regards,
Stef
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
Richard
Top achievements
Rank 1
Answers by
Richard
Top achievements
Rank 1
Stef
Telerik team
Share this question
or