Reporting WCF in Console App

4 posts, 0 answers
  1. Shilpi
    Shilpi avatar
    2 posts
    Member since:
    Jul 2016

    Posted 17 Oct Link to this post

    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

  2. Stef
    Admin
    Stef avatar
    3050 posts

    Posted 18 Oct Link to this post

    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
  3. DevCraft banner
  4. Shilpi
    Shilpi avatar
    2 posts
    Member since:
    Jul 2016

    Posted 18 Oct Link to this post

    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.

  5. Stef
    Admin
    Stef avatar
    3050 posts

    Posted 18 Oct Link to this post

    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
Back to Top