im new in telerik report. my project is, i want webapi call Report Library that i created using telerik VS report designer). after follow the demo, i success for calling standalone report. but now i want to call from report library
.here is my code
in view
in web api
i have create a Project for ReportLibrary and class UserReport.cs using VS ReportDesigner. i need to call UserReport in WebApi or View? and how to call?
firstly i need to change
to
how about in ReportsController?
i no need to use ReportFileResolver right?
thank you so much
.here is my code
in view
@( Html.TelerikReporting().ReportViewer() .Id("reportViewer1") .ServiceUrl("xhttp://xxxx/api/reports/") .TemplateUrl("/ReportViewer/templates/telerikReportViewerTemplate.html") .ReportSource(new UriReportSource() { Uri = "User.trdx" }) .ViewMode(ViewModes.INTERACTIVE) .ScaleMode(ScaleModes.SPECIFIC) .Scale(1.0) )in web api
public class Reports1Controller : ReportsControllerBase{ protected override IReportResolver CreateReportResolver() { var appPath = HttpContext.Current.Server.MapPath("~/Reports"); return new ReportFileResolver(appPath) .AddFallbackResolver(new ReportTypeResolver()); } protected override ICache CreateCache() { return CacheFactory.CreateFileCache(); }}i have create a Project for ReportLibrary and class UserReport.cs using VS ReportDesigner. i need to call UserReport in WebApi or View? and how to call?
firstly i need to change
.ReportSource(new UriReportSource() { Uri = "User.trdx" }to
.ReportSource(new TypeReportSource() { TypeName ="Class1.User, Class" })
how about in ReportsController?
i no need to use ReportFileResolver right?
thank you so much