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

Bind ObjectDatasource to silverlight telerik report

5 Answers 135 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
soumen
Top achievements
Rank 1
soumen asked on 26 Aug 2010, 01:39 PM
Hi Team,

How to bind collection of object to telerik reportviewer datasource from silverlight end.In our project the scenerio is user populates a dataset and then modify it in silverlight .Client need to bind the datasource to report.So my question is does telerik report viewer support collection of object as report parameter. Our main criterion is bind datasource to reportviewer from silverlight end.We are planning to buy the telerik report toolkit.But Without this feature it is not possible.please guy tell us a proper solution.

Thanks
Soumen

5 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 27 Aug 2010, 02:16 PM
Hi Soumen,

Currently the reporting engine is not compatible with Silverlight and it requires .NET framework to perform its operations, in other words the reports reside on the server and you cannot access them from your Silverlight application directly. Currently using report parameters (Programmatic Initialization of Report Parameter Values in Telerik Reporting Silverlight Viewer) is the only way to pass data back from the Silverlight application to the report. Then on the server in the report you can handle the passed value and modify the report data accordingly.
The Report Parameters allowed types are Boolean, DateTime, Integer, Float and String. Sending collection of objects from the client to the server is not a good idea due to various reasons, so this is not an option. What you can do is try concatenating values to a string report parameter. Then on the server in the report NeedDataSource event, access that report parameter, separate the actual data from the value and use them to either build up appropriate DataSource and bind the report to it or filter the data in the report accordingly.

Sincerely yours,
Steve
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
0
soumen
Top achievements
Rank 1
answered on 27 Aug 2010, 07:42 PM
Thank you for your reply.

ok we can do it using needdatasource event.that is fine.Now tell me one solution is it possible to design the report using needdatasource event or we have to design programatically ? Because one thing i notice if we have to design a report using wizard then we have to bind datasource at design time.So what will be the solution.

i am looking for your reply.

Thanks once again.
0
Steve
Telerik team
answered on 30 Aug 2010, 01:08 PM
Hi Soumen,

Indeed you are correct - the database fields are available in the Data Explorer only when the report is bound at design time through the DataSource property. With this said you can still design the report in design time by specifying a dummy datasource that contains your database columns or just type an appropriate expression manually in the report items (you would have to know their names) e.g. = Fields.MyColumn, where MyColumn is a column from your database.

Best wishes,
Steve
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
0
soumen
Top achievements
Rank 1
answered on 01 Sep 2010, 06:36 AM
Can you provide a dummy project for that.

Thanks
Soumen
0
Steve
Telerik team
answered on 02 Sep 2010, 05:07 PM
Hello soumen,

Can you clarify what dummy project you require? If it is related to my previous reply then I would try to give you an example. You can use our Data Source Components to connect to your DataSource in the Report Designer, this way your database fields would be available in the Data Explorer and you would be able to create the report layout you need. Then to avoid using this datasource in runtime, either reset the DataSource property in the designer or set this.DataSource = null; in the report constructor right after the InitializeComponent() call.

Regards,
Steve
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
Tags
General Discussions
Asked by
soumen
Top achievements
Rank 1
Answers by
Steve
Telerik team
soumen
Top achievements
Rank 1
Share this question
or