Report 'Report1.trdp' cannot be resolved.

2 posts, 0 answers
  1. Francisco
    Francisco  avatar
    5 posts
    Member since:
    Jul 2016

    Posted 09 Sep Link to this post

    My View
     
    <style>
     
            #reportViewer1 {
                position: relative;
                width: 1300px;
                height: 900px;
            }
        </style>
     
    @(Html.TelerikReporting().ReportViewer()
            .Id("reportViewer1")
            .ServiceUrl(Url.Content("/api/reports/"))
            .TemplateUrl("/Resources/Templates/telerikReportViewerTemplate.html")
            .ReportSource(new UriReportSource() { Uri = "Report1.trdp" })
            .ViewMode(ViewMode.Interactive)
            .ScaleMode(ScaleMode.Specific)
            .Scale(1.0)
            .PersistSession(false)
            .PrintMode(PrintMode.AutoSelect)
    )
     
    My controller
     
    namespace OvalWeb.Controllers
    {
        using System.IO;
        using System.Web;
        using Telerik.Reporting.Cache.File;
        using Telerik.Reporting.Services;
        using Telerik.Reporting.Services.Engine;
        using Telerik.Reporting.Services.WebApi;
     
        //The class name determines the service URL.
        //ReportsController class name defines /api/report/ service URL.
        public class ReportsController : ReportsControllerBase
        {
            static ReportServiceConfiguration preservedConfiguration;
     
            static IReportServiceConfiguration PreservedConfiguration
            {
                get
                {
                    if (null == preservedConfiguration)
                    {
                        preservedConfiguration = new ReportServiceConfiguration
                        {
                            HostAppId = "OvalWebReport",
                            Storage = new FileStorage("C:/Storage"),
                            ReportResolver = CreateResolver(),
                            // ReportSharingTimeout = 0,
                            // ClientSessionTimeout = 15,
                        };
                    }
                    return preservedConfiguration;
                }
            }
     
            public ReportsController()
            {
                this.ReportServiceConfiguration = PreservedConfiguration;
            }
     
            static IReportResolver CreateResolver()
            {
                var appPath = HttpContext.Current.Server.MapPath("~/");
                var reportsPath = Path.Combine(appPath, @"Report\Designs\Ventas\Tickets\Familia");
     
                return new ReportFileResolver(reportsPath)
                    .AddFallbackResolver(new ReportTypeResolver());
            }
        }
    }

     

    It shows me the error attached.

    What could be the problem?

  2. Francisco
    Francisco  avatar
    5 posts
    Member since:
    Jul 2016

    Posted 10 Sep Link to this post

    solve the issue

    removing this code .AddFallbackResolver(new ReportTypeResolver());

Back to Top