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

Security and dynamic databinding with parameters

3 Answers 127 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 14 Mar 2011, 09:48 PM
Hi,

I am looking to integrade your reports for Silverlight into my application. I wend through all your examples and they have one thing in common, all reports are binded to datasource permanently and you can only send parameters from within ReportViewer component.  Here what I need:

1. Before opening report on the client side, I need to send some parameters to the server.  Based on these parameters, I will generate a set of data objects (i.e. IEnumerable or other collectable object) and bind it to the report, so that only this data is returned to the client side.  How do I achiev this?
1.a. Alternatively, if I could return only the report template to the client and separately I could get a list of data objects from the service.  Then bind it to the Report Viewer on the client side.
2. How do I protect my service from illigal use?  Here is a simple example.  If I want to call some method from the service, one of my parameters can be a password.  When service receives a call, I evaluate that parameter, if it matches the password, I return the result.  This prevents someone designing a silverlight program which connects to my service without know this password.  How does it work with your reports?  What stops someone creating a silverlight application with your ReportViewer, connect to my service and retrieve all data?

3 Answers, 1 is accepted

Sort by
0
Squall
Top achievements
Rank 1
answered on 17 Mar 2011, 02:29 PM
I have made a similar report with Report Parameters and an User Function to prepare my data. Then I used a Binding to the DataSource property. Alternatively you can use NeedDataSource and get the report parameter value from the event:

(

 

"" as Telerik.Reporting.Processing.Report).Report.Parameters["myParam"].Value

 

0
Michael
Top achievements
Rank 1
answered on 18 Mar 2011, 04:22 PM
Thank you for the answer.  But there is just not enough information in the documentation about this.  Would you be able to send me a small example demostrating this?  Note, it has to be for Silverlight!!!

Thank you in advance,

Michael
0
Peter
Telerik team
answered on 22 Mar 2011, 01:53 PM
Hi Michael,

Thank you for your interest in Telerik Reporting.

I have attached a sample report. It will work the same way no matter what is the application. Generally the most significant difference between the Silverlight Report Viewer and the other viewers is that the Silverlight Report Viewer lives entirely on the client side, while the reports and the rendering engine are on the server side (accessible through the Telerik Reporting WCF Service).

Greetings,
Peter
the Telerik team
Tags
General Discussions
Asked by
Michael
Top achievements
Rank 1
Answers by
Squall
Top achievements
Rank 1
Michael
Top achievements
Rank 1
Peter
Telerik team
Share this question
or