Telerik Forums
Reporting Forum
1 answer
247 views

Hi,

I am not sure that I have designed my report the most efficient way but that is another issue, I currently have a report that displays multiple different parameters from a database each displayed in their own table with their own sqldatasource.  This all works fine but like I say, I don't think this is the most efficient way.

 

My issue is, there is a requirement for one of the parameters to only be displayed depending on the value of another parameter in another table.  How would I go about doing this?

 

Any help/pointers in the right direction would be greatly appreciated.

 

Thanks

 

Kristin

Todor
Telerik team
 answered on 03 Jul 2018
1 answer
260 views

Hi Telerik team,

I know actually there is no native support for localization in standalone report (contrary to visual studio report).

I wondered if this feature will be implemented in a near future or if it is not planned for the moment.

Thanks a lot for your feedback.

Yannick

Silviya
Telerik team
 answered on 03 Jul 2018
2 answers
266 views

Hi Team,

We are getting the error message "Internal Server error. The Device is not ready"

Is there a solution/fix available to avoid the following error which occurs inconsistently."
"Internal Server error. The device is not ready! .

Kindly let us know when this issue will occur since we are not able to reproduce consistently

PFA error snapshot for the exact error details

Additional Details : Issue occurs only when we host the application in IIS, when we run locally we dont have any issues.

 

daniel daryl
Top achievements
Rank 1
 answered on 03 Jul 2018
4 answers
886 views
I have 5 groups in my report (say Group 1, Group 2, Group 3, Group 4, Group 5)
Group 1 - parent, Group 2 - child of Group 1, Group 3 - child of Group 2, Group 4 - child of Group 3 and Group 5 - child of Group 4

Group 4 and Group 5 are by default true but Group 1, 2 & 3 depends on the parameter (with multivalue/checkboxes - Group 1, 2 ,3)
i.e. user can choose combination of Group 1,2,3 or null

How can I set it up in the Telerik Report Designer?

Something like this--

Group1 - depends on parameter value
Group2 - depends on parameter value
Group3 - depends on parameter value
Group4 - always true
Group5 - always true
Data:- Name, Amount
Data:-Total by Group4  Sum(Amount)

It should always show the Data no matter what combination of parameters user choose or null.
venkateswararao
Top achievements
Rank 1
 answered on 30 Jun 2018
3 answers
1.6K+ views
Hello,

I am trying to use HTML5 Report Viewer with MVC extension helper.

I have an error "Unable to get report parameters: Missing report name". It is happening during POST request to /api/reports/clients/210953-ab00/parameters which gets 400 Bad Request. 

I guess because request data do not have report: parameterValues: {} report: null

I call HTML helper like that:

    @(Html.TelerikReporting().ReportViewer()
        .Id("reportViewer1").ReportResolver(new TypeReportSourceResolver())
        .ServiceUrl("/api/reports/")
        .TemplateUrl(Url.Content("~/ReportViewer/templates/telerikReportViewerTemplate.html"))
        .ReportSource(new InstanceReportSource(){ReportDocument = new SessionReport()})
        .ViewMode(ViewModes.INTERACTIVE)
        .ScaleMode(ScaleModes.SPECIFIC)
        .Scale(1.0)
        .PersistSession(false)
    )

I have my ReportController implemented like:

public class ReportsController : ReportsControllerBase
    {
        protected override IReportResolver CreateReportResolver()
        {
            var reportsPath = HttpContext.Current.Server.MapPath("~/Reports");

            return new ReportFileResolver(reportsPath)
                .AddFallbackResolver(new ReportTypeResolver());
        }

        protected override ICache CreateCache()
        {
            return Telerik.Reporting.Services.Engine.CacheFactory.CreateFileCache();
        }
    }

And as I am using MVC5 with WepApi2 I have in my web.config following (I am not sure about last entry for Newtonsoft.Json):

      <dependentAssembly>
        <assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="1.0.0.0-5.1.0.0" newVersion="5.1.0.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="1.0.0.0-5.1.0.0" newVersion="5.1.0.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="1.0.0.0-4.5.0.0" newVersion="4.5.0.0" />
      </dependentAssembly>

Can you help, please? Regards, Yegor.
amaeze
Top achievements
Rank 1
 answered on 28 Jun 2018
1 answer
313 views

hello,

I'm using Telerik Reporting HTML Viewer (telerikReportViewer-8.1.14.618.min.js). 
In the server side I'm using Telerik.Reporting in c#.
All are work perfectly but once every few months all reports are stop working, 
I get some http errors in some telerik reporting automatic requests.


Sometimes I got the error for the following request:
POST http://web.otech.co.il/otech/api/reports/clients  
the response is:
System.ArgumentNullException Value cannot be null
at System.Linq.Enumerable.Select[TSource,TResult](IEnumerable`1 source, Func`2 selector)\r\n   
at Telerik.Reporting.Services.Engine.PersistableCollection`1.GetEnumerator()\r\n   
at Telerik.Reporting.Services.Engine.ReportEngine.CollectExpiredData()\r\n   
at Telerik.Reporting.Services.Engine.ReportEngine.RegisterClient()\r\n   
at Telerik.Reporting.Services.WebApi.ReportsControllerBase.RegisterClient()\r\n   
at lambda_method(Closure , Object , Object[] )\r\n   
at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass13.<GetExecutor>b__c(Object instance, Object[] methodParameters)\r\n   
at System.Threading.Tasks.TaskHelpers.RunSynchronously[TResult](Func`1 func, CancellationToken cancellationToken)"}


Sometimes I got error 500 for the following request:
POST http://web.otech.co.il/otech/api/reports/clients/102530-76b8/instances 
the response is: 
System.ArgumentNullException Value cannot be null
 at System.Linq.Enumerable.Select[TSource,TResult](IEnumerable`1 source, Func`2 selector)\r\n  
 at Telerik.Reporting.Services.Engine.PersistableCollection`1.GetEnumerator()\r\n   
at Telerik.Reporting.Services.Engine.KeyItemPersistableCollection`2.ResolveItem(K referredInstanceKey, Boolean& newItem)\r\n  
 at Telerik.Reporting.Services.Engine.ReportEngine.CreateReportInstance(String clientID, String report, Dictionary`2 parameterValues)\r\n
   at Telerik.Reporting.Services.WebApi.ReportsControllerBase.CreateInstance(String clientID, ClientReportSource reportSource)\r\n   
at lambda_method(Closure , Object , Object[] )\r\n   
at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass13.<GetExecutor>b__c(Object instance, Object[] methodParameters)\r\n   
at System.Threading.Tasks.TaskHelpers.RunSynchronously[TResult](Func`1 func, CancellationToken cancellationToken)"}


Sometimes I got the error for the following request:
POST http://web.otech.co.il/otech/api/reports/clients/103331-358d/parameters 
the response is:
Invalid report type
System.ArgumentException
 at Telerik.Reporting.Processing.TypeReportDocumentResolver.Resolve(IProcessingContext context, TypeReportSource rs)\r\n  
 at Telerik.Reporting.Processing.ReportDocumentResolver`1.Telerik.Reporting.Processing.IReportDocumentResolver.Resolve
(IProcessingContext context, ReportSource rs, Boolean loadParameters)\r\n   
at Telerik.Reporting.Processing.ReportDocumentResolver.Bind[T](ReportSource source, Func`2 func)\r\n   
at Telerik.Reporting.Services.Engine.DocumentResolver.ResolveReportDocument(ReportSource source, Boolean applyParameters)\r\n   
at Telerik.Reporting.Services.Engine.ReportEngine.GetParameters(String clientID, String report, Dictionary`2 parameterValues)\r\n   
at Telerik.Reporting.Services.WebApi.ReportsControllerBase.GetParameters(String clientID, ClientReportSource reportSource)\r\n   
at lambda_method(Closure , Object , Object[] )\r\n   
at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass13.<GetExecutor>b__c(Object instance, Object[] methodParameters)\r\n   
at System.Threading.Tasks.TaskHelpers.RunSynchronously[TResult](Func`1 func, CancellationToken cancellationToken)"} 

This error is occurred on known report that worked perfectly before.



I'm try restart the IIS, restart the computer ant etc. , nothing helped.
When I copy the entire site directory  and configure new site in IIS - It started work again.
Also, If I copy the entire site directory to another new directory and just configure the existing site to link to the new directory - also it started work..

Do you know what can be the reason of this problem? It's very worth for my customer to stop and recreate the site once every few months..

Thanks,

Chani





Nasko
Telerik team
 answered on 28 Jun 2018
1 answer
83 views
Hello,

I followed the steps in the Telerik reporting video found here: https://www.youtube.com/watch?v=UF1mL6vzJDs. I was able to get everything working on my development machine but when I put it up on the webserver, it just gets to the part where the page says "loading..." and stops.  No error, nothing.  Any suggestions on what I might be missing.  I am able to tell that it at least gets to this line in the index.html:  <script type="text/javascript">
        $(document).ready(function () {

Thanks,

 

Jennifer

Nasko
Telerik team
 answered on 28 Jun 2018
2 answers
197 views

Hello,

I'm trying to setup reports in my Angular application.  I've followed the guides and I'm stuck at creating the REST service. My setup:

 

Angular 6 application

.NET Core Web API

Telerik REST Project

 

When following this guide:

https://docs.telerik.com/reporting/telerik-reporting-rest-host-http-service-using-web-hosting

 

I get an error when using the project template.  It's

"The name 'AreaRegistration' does not exist in the current context"

 

Any ideas would be appreciated.

Nasko
Telerik team
 answered on 28 Jun 2018
2 answers
964 views

I am receiving the following error (used Fiddler to find it) when attempting to load ReportViewer on IIS 10 on Windows Server 2016. I do not receive the error when running locally (from VS 2015). I am using v12.0.18.227 of Telerik.Reporting, Telerik.ReportViewer.Mvc, and Telerik.Reporting.Services.WebApi. The process runs using telerikReportViewer-12.0.18.227.js.

This report has additional lookups defined for drop-downs (as partially displayed in "Localhost_working.png").

 

HTTP/1.1 500 Internal Server Error
Cache-Control: no-cache
Pragma: no-cache
Content-Type: application/json; charset=utf-8
Expires: -1
Server: Microsoft-IIS/10.0
X-AspNet-Version: 4.0.30319
Persistent-Auth: true
X-Powered-By: ASP.NET
Date: Tue, 26 Jun 2018 15:14:11 GMT
Content-Length: 5953
{"message":"An error has occurred.","exceptionMessage":"Exception has been thrown by the target of an invocation.","exceptionType":"System.Reflection.TargetInvocationException","stackTrace":"   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)\r\n   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)\r\n   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)\r\n   at Telerik.Reporting.Processing.Data.SqlProviderFactory.DeriveParameters(IDbCommand command) in c:\\temp\\reporting\\RBuild-18700\\Reporting_Build\\Source\\Code\\Telerik.Reporting.Processing.Data\\SimpleDataSources\\Sql\\SqlCommandProvider.cs:line 175\r\n   at Telerik.Reporting.Processing.Data.SqlCommandProvider.ResolveProcedure(IDbCommand command, SqlDataSourceParameterCollection parameters) in c:\\temp\\reporting\\RBuild-18700\\Reporting_Build\\Source\\Code\\Telerik.Reporting.Processing.Data\\SimpleDataSources\\Sql\\SqlCommandProvider.cs:line 311\r\n   at Telerik.Reporting.Processing.Data.SqlQueryProvider.CreateCommandCore(IDbConnection connection, Boolean evaluateParameters) in c:\\temp\\reporting\\RBuild-18700\\Reporting_Build\\Source\\Code\\Telerik.Reporting.Processing.Data\\SimpleDataSources\\Sql\\SqlQueryProvider.cs:line 119\r\n   at Telerik.Reporting.Processing.Data.SqlQueryProvider.CreateCommand(IDbConnection connection) in c:\\temp\\reporting\\RBuild-18700\\Reporting_Build\\Source\\Code\\Telerik.Reporting.Processing.Data\\SimpleDataSources\\Sql\\SqlQueryProvider.cs:line 91\r\n   at Telerik.Reporting.Processing.Data.SqlDataEnumerable.<GetEnumerator>d__0.MoveNext() in c:\\temp\\reporting\\RBuild-18700\\Reporting_Build\\Source\\Code\\Telerik.Reporting.Processing.Data\\SimpleDataSources\\Sql\\SqlDataEnumerable.cs:line 117\r\n   at Telerik.Reporting.Processing.Data.SeedDataAdapter.GroupData(IEnumerable`1 rawData) in c:\\temp\\reporting\\RBuild-18700\\Reporting_Build\\Source\\Code\\Telerik.Reporting.Processing.Data\\SeedDataAdapter.cs:line 144\r\n   at Telerik.Reporting.Processing.Data.SeedDataAdapter.Execute(IEnumerable`1 data) in c:\\temp\\reporting\\RBuild-18700\\Reporting_Build\\Source\\Code\\Telerik.Reporting.Processing.Data\\SeedDataAdapter.cs:line 119\r\n   at Telerik.Reporting.Processing.Data.ResultSetAdapter.Execute(IEnumerable`1 data) in c:\\temp\\reporting\\RBuild-18700\\Reporting_Build\\Source\\Code\\Telerik.Reporting.Processing.Data\\ResultSet.cs:line 22\r\n   at Telerik.Reporting.Processing.Data.MultidimentionalDataProvider.Execute(MultidimensionalQuery query) in c:\\temp\\reporting\\RBuild-18700\\Reporting_Build\\Source\\Code\\Telerik.Reporting.Processing.Data\\MultidimentionalDataProvider.cs:line 48\r\n   at Telerik.Reporting.Processing.ReportParametersManager`1.CalculateParameterProperties(P parameter, IReportParameter parameterDef, IDictionary`2 parameterValues, Boolean parentChanged) in c:\\temp\\reporting\\RBuild-18700\\Reporting_Build\\Source\\Code\\Telerik.Reporting.Processing\\ReportParametersManager.cs:line 317\r\n   at Telerik.Reporting.Processing.ReportParametersManager`1.Calculate(P parameter, IDictionary`2 parameterValues, Boolean parentChanged, Boolean& valueChanged) in c:\\temp\\reporting\\RBuild-18700\\Reporting_Build\\Source\\Code\\Telerik.Reporting.Processing\\ReportParametersManager.cs:line 267\r\n   at Telerik.Reporting.Processing.ReportParametersManager`1.RecalculateParameters(IDictionary`2 parameterValues) in c:\\temp\\reporting\\RBuild-18700\\Reporting_Build\\Source\\Code\\Telerik.Reporting.Processing\\ReportParametersManager.cs:line 172\r\n   at Telerik.Reporting.Processing.DocumentParametersManager`1.CalculateParameters(IDictionary`2 values) in c:\\temp\\reporting\\RBuild-18700\\Reporting_Build\\Source\\Code\\Telerik.Reporting.Processing\\DocumentParametersManager.cs:line 113\r\n   at Telerik.Reporting.Processing.DocumentParametersManager`1.GetMergedParameters(IDictionary`2 values) in c:\\temp\\reporting\\RBuild-18700\\Reporting_Build\\Source\\Code\\Telerik.Reporting.Processing\\DocumentParametersManager.cs:line 129\r\n   at Telerik.Reporting.Services.WebApi.ReportsControllerBase.GetParameters(String clientID, ClientReportSource reportSource) in c:\\temp\\reporting\\RBuild-18700\\Reporting_Build\\Source\\Code\\Telerik.Reporting.Services.WebApi\\ReportsControllerBase.cs:line 166\r\n   at lambda_method(Closure , Object , Object[] )\r\n   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass6_1.<GetExecutor>b__3(Object instance, Object[] methodParameters)\r\n   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__1.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__5.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Controllers.ExceptionFilterResult.<ExecuteAsync>d__6.MoveNext()"}

Silviya
Telerik team
 answered on 28 Jun 2018
2 answers
237 views

Greetings.

I'm just learn how to use telerik reporting app, It still run fine when i'm test it on telerik report designer (pic 1), but when i'm run it on browser the parameter input field not show (pic2)..  i already have set parameter to visible on designer tho.

did i miss something ? , can someone help me ? .. i need it ASAP.

Thanks :)

here's my controller 

[Route("api/reports")]
    public class ReportsController : ReportsControllerBase
    {
     string reportsPath = string.Empty;
 
        public ReportsController(IHostingEnvironment environment)
        {
             
            this.reportsPath = Path.Combine(environment.WebRootPath, "Reports");
             
            this.ReportServiceConfiguration = new ReportServiceConfiguration
            {
                HostAppId = "ReportingApp",
                Storage = new FileStorage(),
                ReportResolver = new ReportFileResolver(reportsPath)
                //ReportResolver = new ReportTypeResolver()
                //                    .AddFallbackResolver(new ReportFileResolver(this.reportsPath)),
            };
 
 
            
        }
 
        [HttpGet("reportlist")]
        public IEnumerable<string> GetReports()
        {
            return Directory
                .GetFiles(this.reportsPath)
                .Select(path =>
                    Path.GetFileName(path));
        }
 
 
        [HttpGet("test")]
        public string test()
        {
             
            return    this.reportsPath.ToString() ;
        }
 
 
    }

 

and my view :

<!DOCTYPE html>
 
<html>
<head>
    <title>Mutasi Printout</title>
 
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
 
    <script src="https://code.jquery.com/jquery-2.2.4.min.js" integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=" crossorigin="anonymous"></script>
 
    <link href="http://kendo.cdn.telerik.com/2015.3.930/styles/kendo.common.min.css" rel="stylesheet" id="common-css" />
    <link href="http://kendo.cdn.telerik.com/2015.3.930/styles/kendo.blueopal.min.css" rel="stylesheet" id="skin-css" />
 
    <!--kendo.all.min.js can be used instead-->
 
    <script src="js/telerikReportViewer.kendo-12.1.18.516.min.js"></script>
    <script src="js/telerikReportViewer-12.1.18.516.min.js"></script>
    <script src="js/themeSwitcher.js"></script>
 
    <style>
        body {
            font-family: Verdana, Arial;
            margin: 5px;
        }
 
        #reportViewer1 {
            position: absolute;
            left: 5px;
            right: 5px;
            top: 40px;
            bottom: 5px;
            overflow: hidden;
            clear: both;
        }
 
        #theme-switcher {
            float: right;
            width: 12em;
            height: 30px;
        }
    </style>
</head>
<body>
    <select id="theme-switcher"></select>
 
    <div id="reportViewer1">
        loading...
    </div>
 
    <script type="text/javascript">
        $(document).ready(function () {
            //Theme switcher
            themeSwitcher(
                '#theme-switcher',
                '#common-css',
                '#skin-css');
             
            $("#reportViewer1")
                .telerik_ReportViewer({
                    serviceUrl: "api/reports/",
                    reportSource: {
 
                        report: "BasketSize.trdp",
 
                        parameters: {}
                    },
 
                    viewMode: telerikReportViewer.ViewModes.INTERACTIVE,
                    scaleMode: telerikReportViewer.ScaleModes.SPECIFIC,
                    scale: 1.0,
 
                  
                   // enableAccessibility: false
                });
        });
    </script>
 
</body>
</html>

 

 

Silviya
Telerik team
 answered on 28 Jun 2018
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?