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

Error set DataSource for Report

1 Answer 37 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Tuan
Top achievements
Rank 1
Tuan asked on 02 May 2018, 11:26 AM

I have 2 project:

1. Angular (pictrure: 1.JPG)

2. Rest Service

- I used class MyResolver() (pictrure: 2.jpg)

Error function DeserializeReport

1 Answer, 1 is accepted

Sort by
0
Katia
Telerik team
answered on 07 May 2018, 07:04 AM
Hello Tuan,

Deserialization will only be required for XML report definitions (TRDP or TRDX reports). In your scenario, the report is specified by its assembly-qualified name which means that it is designed in Visual Studio report designer. Therefore, you can work directly with report class inside custom report resolver, for example:
internal class MyResolver : IReportResolver
   {
       public ReportSource Resolve(string report)
       {
           Report reportInstance = null;
 
           if (report.Contains("1"))
           {
               reportInstance = new Report1();
               reportInstance.DataSource = dataSource;
           }
           ...
 
           return reportInstance;
       }
   }


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