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

Reporting WCF in Console App

3 Answers 85 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Shilpi
Top achievements
Rank 1
Shilpi asked on 17 Oct 2016, 04:20 PM

Hi -

 

We have a few telerik reports that are hosted in a silverlight web site. And I am trying to create a console app that would generate and save the reports in PDF formal. When I call "Render", I get the message, "The report can't be created". I am not sure what I would need to do different.

 

Please help.

 

Thanks, Shilpi

3 Answers, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 18 Oct 2016, 12:49 PM
Hello Shilpi,

If you are using a Silverlight ReportViewer and Reporting WCF service, reports should be hosted in the Reporting WCF service's project.

At the client you can get rendered report by using a client for the Reporting WCF service - Exporting Report in Silverlight.
At the server you can use a ReportProcessor and another instance of the report to export it and save the bytes in a custom storage - Exporting Report Programmatically.


I hope this helps.

Regards,
Stef
Telerik by Progress
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
Shilpi
Top achievements
Rank 1
answered on 18 Oct 2016, 04:52 PM

Thank you, everything worked great except when I had to pass in Array parameter.

 

Type 'System.Object[]' with data contract name 'ArrayOfanyType:http://schemas.microsoft.com/2003/10/Serialization/Arrays' is not expected. Consider using a DataContractResolver if you are using DataContractSerializer or add any types not known statically to the list of known types - for example, by using the KnownTypeAttribute attribute or by adding them to the list of known types passed to the serializer.

0
Stef
Telerik team
answered on 18 Oct 2016, 04:57 PM
Hi Shilpi,

This is expected. If you want to transfer collections or collection properties, the business objects must be serializable or of known types. You may need to write custom serialization for the business objects to be able to pass them.

For more details, check Serialization and Deserialization (msdn).

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