Telerik Forums
Reporting Forum
1 answer
870 views
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?

Francisco
Top achievements
Rank 1
 answered on 10 Sep 2019
3 answers
460 views

I want to create 1 report where a user would select a parameter and the report would connect to that parameters database.

Right now, I've created multiple reports that are pretty much the same except they are connecting to different databases. I would just like 1 report and based on the parameter the user chooses it will connect to that database.

 

 

 

Silviya
Telerik team
 answered on 10 Sep 2019
2 answers
129 views

Hello,

I am searching for ways of implementing reports properly with accordance to WCAG 2.0 in WPF projekt.

Is there any way to programmatically tag items in report, add natural language and other metadata?

Silviya
Telerik team
 answered on 10 Sep 2019
3 answers
124 views
This is a test forum post, please ignore.
Eric R | Senior Technical Support Engineer
Telerik team
 answered on 09 Sep 2019
2 answers
846 views

C# ASP.NET MVC

I have the following code in view:

<script type="text/javascript">         

                $("#reportViewer1").telerik_ReportViewer({                 

                       templateUrl: "/Resources/Templates/telerikReportViewerTemplate.html",                 

                       serviceUrl: "/api/reports",                 

                       reportSource: {report: "VentasFamilia.trdp",

                                               parameters: {                     

                                                       Delegaciones: $("#filterDelegacion").data("kendoMultiSelect").value(),                               Familias: $("#filterFamilia").data("kendoMultiSelect").value(),                     

                                                      Series: $("#filterSerie").data("kendoMultiSelect").value(),                    

                                                      FechaInicio: $("#desde").val(),                     

                                                      FechaFin: $("#hasta").val()                   

                                                     }                 

                   }             

});     

</script>

How should I do on the controller to receive the parameters and name of the report?

Silviya
Telerik team
 answered on 09 Sep 2019
1 answer
69 views

Hi,

I have tried to use the Visual Studio Report Designer for Telerik Reporting, my solution contains an asp.net core 2.1 web app and i have created an api controller, the idea is provide json data from my controller/actionresult in my web app to Report Designer Visual Studio 2017 to create a report though webservice datasource.  I have recieved an error (see image#3_ReporDesignerVS2017.PNG attached).  So, my question is: do the webservice datasource from designer allows connect with .SVC (WCF) or .ASMX (SOAP) services only? My web app retrieve data as REST service, what are your recommendations?

 

Thanks,

David Gonzalez,

 

Jose
Top achievements
Rank 1
 answered on 06 Sep 2019
5 answers
873 views
Hi,
Please explain to me how to delete the empty space that appears between the group ranges, if I set the visibility in the detailed range = False
Todor
Telerik team
 answered on 05 Sep 2019
1 answer
772 views

Hello.

I got a PictureBox that the URI is a call to an action method :

="https://mysite.com/Stocks/Dwnlod/" + CStr(Fields.PhysicalName)

 

I use ASP.NET MVC Core and my pictures are not in wwwroot.  They are under another directory of the project.

So I use a method to get the filestream of the file :

[Authorize]
public async Task<FileStreamResult> Dwnlod(string id)
{
    ...
    var memory = new MemoryStream();
    try
    {
        using (var stream = new FileStream(path, FileMode.Open))
        {
            await stream.CopyToAsync(memory);
        }
    }
    catch (Exception e)
    {
 
    }
    memory.Position = 0;
 
    return File(memory, GetContentType(path), Path.GetFileName(path));
}

 

As you can see my action method is decorated [Authorize] so it's impossible to get the stream from the report even if the user is connected and authenticated.  The call of URI from the report seem be anonyous.  So i got a error (of course everything works #1 when I remove the decoration Authorize).

 

Any suggestion to keep [Authorize]?  Can the report can provide some authenification when the URI is called?

 

Thank you all of you at Telerik.

 

 

Neli
Telerik team
 answered on 04 Sep 2019
5 answers
1.4K+ views
How can insert %subject There is shape with rounding, but need . With Strech on, corners are stretched too :( Thx.
Neli
Telerik team
 answered on 04 Sep 2019
8 answers
929 views
I am exporting a report in Excel format and I was curious if there is a way to lock a particular column in the spreadsheet so that it is not editable.
Todor
Telerik team
 answered on 04 Sep 2019
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?