Hi Mike,
Please check the response in your support ticket #
1039775 on the same question.
For anyone concerned, the ReportTypeResolver is not exposed and you will need to use a custom resolver to display a report designed in Visual Studio.
For example:
public
class
ReportsController : ReportsControllerBase
{
static
ReportServiceConfiguration configurationInstance;
readonly
string
webRoot;
static
ReportsController()
{
}
public
ReportsController(IHostingEnvironment env)
{
this
.webRoot = env.WebRootPath;
var resolver =
new
ReportFileResolver(Path.Combine(
this
.webRoot,
"Reports"
)).AddFallbackResolver(
new
MyResolver());
this
.ReportServiceConfiguration =
new
ReportServiceConfiguration
{
HostAppId =
"Html5DemoApp"
,
Storage =
new
FileStorage(),
ReportResolver = resolver,
// ReportSharingTimeout = 0,
// ClientSessionTimeout = 15,
};
}
}
public
class
MyResolver : Telerik.Reporting.Services.Engine.IReportResolver
{
public
ReportSource Resolve(
string
report)
{
return
new
TypeReportSource { TypeName = report };
////if you need to add some changes in the report before displaying it
//Telerik.Reporting.Report reportInstance = null;
//if (report.Contains("Report2"))
// reportInstance = Activator.CreateInstance(Type.GetType(report)) as Telerik.Reporting.Report;
//return new InstanceReportSource { ReportDocument = reportInstance };
}
}
Regards,
Stef
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