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

Passing parameters to ReportService from Silverlight Viewer

5 Answers 334 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Andrew Nixon
Top achievements
Rank 1
Andrew Nixon asked on 17 Nov 2009, 08:21 AM
Hi,

Is there a way to pass parameters from the SIlverlight Report Viewer (or in fact any way from a silverlight app) to the reportservice to be passed into the Report to be run?
I have looked in the documentation and forums but all the examples I can find refer to ASPX or winforms scenarios.

This is an urgent issue for me so if anyone can help it would be much appreciated.

(for clarity, I am trying to pass an 'out of band' type of parameter, not one the user selects. Essentially I need to pass the users id to the report from the client application in order to retrieve appropriate data)

Thanks

Andrew

5 Answers, 1 is accepted

Sort by
0
Svetoslav
Telerik team
answered on 19 Nov 2009, 03:52 PM
Hi Andrew Nixon,

This is not possible currently with Telerik Reporting. Please see the  Silverlight ReportViewer Questions forum thread that discusses a similar problem.

 
Sincerely yours,
Svetoslav
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Deva
Top achievements
Rank 1
answered on 22 Dec 2010, 06:11 PM
Is this still the case?
0
Steve
Telerik team
answered on 22 Dec 2010, 06:55 PM
Hi Deva,

Indeed currently there is no report object exposed on the Silverlight client, meaning that the reports reside on the server and the only way to pass data to it from the Silverlight client is to use the report parameters - more info is available in the Programmatic Initialization of Report Parameter Values in Telerik Reporting Silverlight Viewer KB article.

Kind regards,
Steve
the Telerik team
Get started with Telerik Reporting with numerous videos and detailed documentation.
0
Greg Sipes
Top achievements
Rank 1
answered on 15 Feb 2011, 06:42 PM
Hi Steve,
    I followed the link but I'm not having any luck. I wired up the RenderBegin event and attempted to set 2 parameters to pass to the report's constructor (very careful on name and type for key pair). I put a breakpoint on the report's contructor with those two parameters and it was never it. I then, removed the default constructor, the one with 0 parameters, and now the reportViewer displays "A report instance of type '<myReport>' cannot be created.No parameterless constructor defined for this object." I'm a bit confused.....if I'm passing parameters to the report's constructor, why would I need a default constructor with no parameters? Ultimately, any ideas as to why the correct constructor(the one with the two parameters) isn't being hit?

Thanks in advance
0
Steve
Telerik team
answered on 18 Feb 2011, 02:34 PM
Hello Greg,

Do you use out-of-process session by any chance? If this is the case than you have to follow the rules from the Design Considerations for Out-Proc Session KB article. In general, the report is recreated by using its default constructor and all its state is lost after the deserialization from the Session. The only things that are preserved in the Session are the data sources and the report parameters.

Regards,
Steve
the Telerik team
Tags
General Discussions
Asked by
Andrew Nixon
Top achievements
Rank 1
Answers by
Svetoslav
Telerik team
Deva
Top achievements
Rank 1
Steve
Telerik team
Greg Sipes
Top achievements
Rank 1
Share this question
or