Telerik Forums
Reporting Forum
1 answer
41 views

In Telerik Report Designer, I am having the worst time trying to figure how to find a proper scope name to get the sum of a given expression for every dataitem processing until the end of each page.

For the sake of simplicity, my datasource only has 1 column: saleAmount.

Sample values that fit on page 1

  • 100
  • 200
  • 150

Footer running sum of page 1: 450

Remaining values that fit on page 2

  • 20
  • 30

Footer running sum of page 2: 500

According to this Telerik Reporting article, it seems I should use RunningValue(scope, Sum(Fields.saleAmount))

I've already spent a significant time trying to figure out what exactly should I use as scope parameter,

Please see the attached sample (MyPageRunningTotalSampleReport.zip)

Momchil
Telerik team
 answered on 31 Jan 2024
1 answer
23 views

Hi team support,

 

I was assigned to a project using telerik.reportviewer.webhtml Version=7.1.13.612. As of last week, someone reported a vulnerability bugs of bgColor parameter. 

I've read some articles saying that it has to be upgraded to version 11.0.17.406 (2017 SP2) or later. 
My question is, can I replace telerik.reportviewer.webhtml.dll file with the newest dll only? 
And what about the dependencies? This is the current version of .NET & MS used.

Microsoft.AspNetCore.App 3.1.22 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.14 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.22 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.14 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.1.22 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.14 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]


I have no support from the vendor built because the project was really old.
I'd appreciate any help. Thankyou.

Todor
Telerik team
 answered on 31 Jan 2024
1 answer
57 views

Hello Team,  

I have a report that contains 2 images. one jpg --> base64   and one PDF --> base64. I use expression to fill the value for the picture Box controls as shown below. 

When I run the report the PDF image is missing. I also tried to paste the B64 text, but it didn't work. I'm I missing a step?   

Using Report Designer version 17.2.23.1010.  .NET Framework 4

1 answer
61 views

I updated my front end package.json to use the Telerik Angular Report Wrapper, and the backend to use Telerik.Reporting 17.2.23.1114 trial:

"@progress/telerik-angular-report-viewer": "^20.23.1114",

 

From the browser, when trying to access the backend `ReportsController` (.Net 4.6), I get the following exception:

<ExceptionMessage>Multiple actions were found that match the request: Formats on type SynWAPI.Controllers.ReportsController GetClientsSessionTimeoutSeconds on type SynWAPI.Controllers.ReportsController Version on type SynWAPI.Controllers.ReportsController</ExceptionMessage>
<ExceptionType>System.InvalidOperationException</ExceptionType>

Now generally when I send a test request to the old version of TelerikReports (14.x) from https://MyApp01.MySite.com/MyApp/api/reports, I get the following response in the browser (however in my upgrade envir it's throwing the above exception):

[{"name":"PDF","localizedName":"Acrobat (PDF) file"},{"name":"CSV","localizedName":"CSV (comma delimited)"},{"name":"XLS","localizedName":"Excel 97-2003"},{"name":"RTF","localizedName":"Rich Text Format"},{"name":"IMAGE","localizedName":"TIFF file"},{"name":"MHTML","localizedName":"Web Archive"},{"name":"XPS","localizedName":"XPS Document"}]

 

In my Angular component html, I'm using the Telerik Wrapper:        

<tr-viewer
    [serviceUrl]="serviceUrl"
    [reportSource]="reportSource"
    [viewMode]="'INTERACTIVE'"
    [scaleMode]="'SPECIFIC'"
    [scale]="1.0"
    [templateUrl]="templateUrl"
>
</tr-viewer>

 

and my `ReportsController` on the backend (.net 4.6)

(based on https://docs.telerik.com/reporting/embedding-reports/host-the-report-engine-remotely/rest-service-report-source-resolver/use-custom-report-source-and-document-resolvers?_ga=2.110664256.43783964.1705943251-1117489418.1701363987&_gl=1*3x39f9*_ga*MTExNzQ4OTQxOC4xNzAxMzYzOTg3*_ga_9JSNBCSF54*MTcwNjExMTg5NC4yMC4xLjE3MDYxMTI5MTMuNDYuMC4w*_gcl_au*NTYzNzA2MTUwLjE3MDEzNjM5ODY. )

using System;
using System.Collections.Generic;
using System.IO;
using System.Web.Http;
using Telerik.Reporting.Cache.Interfaces;
using Telerik.Reporting.Services.WebApi;
using System.Web;
using Telerik.Reporting.Services;
using Telerik.Reporting;

namespace SynWAPI.Controllers
{
    [AllowCrossSiteJson]
    [RoutePrefix("api/reports")]
    public class ReportsController : ReportsControllerBase
    {
        [HttpGet]
        [Route("IsReady")]
        public IHttpActionResult IsReady()
        {
            return Ok("OK Dude !");
        }

        public ReportSource Resolve(string uri, OperationOrigin operationOrigin, IDictionary<string, object> currentParameterValues)
        {
            {
                var appPath = HttpContext.Current.Server.MapPath("~/");
                string reportPath = Path.Combine(appPath, @".\Reports");

                var reportPackager = new ReportPackager();
                Report report = null;
                using (var sourceStream = System.IO.File.OpenRead(reportPath))
                {
                    report = (Report)reportPackager.UnpackageDocument(sourceStream);
                }
               
                return new InstanceReportSource
                {
                    ReportDocument = report
                };
            }
        }
        
        [Obsolete]
        protected override ICache CreateCache()
        {
            return Telerik.Reporting.Services.Engine.CacheFactory.CreateFileCache();
        }
    }
}

 

I can't seem to resolve this issue. Do you have further examples online, or any advice for me here ?

 

thanks,

Bob

 

Bob
Top achievements
Rank 1
Iron
 updated question on 29 Jan 2024
1 answer
32 views

Hello,

I have an existing report that consists of two pages and should have the same header on both pages, but different footers. How can I transfer the existing report to the report book without changing the code under which the report was saved? Or how can I add two different footers into one report?

Thank you for your reply.

Vedrana Turković

Todor
Telerik team
 answered on 26 Jan 2024
1 answer
33 views
For the standalone / web report designer, is it open source and allow customization? 
Dimitar
Telerik team
 answered on 22 Jan 2024
1 answer
46 views

When ever I rotate the textbox angle within (90,180,270), this work. 

I have  a problem dealing with angles like ( 315),  the text is always wrapped to the next line regardless of the size of the textbox and number of characters of the textbox value .  So for example, "Etzebeth Thomas" is shown as "Etze" first line and the rest disappear or get displayed within the second line and so forth. 

Look at the below picture

 

This looks like an old issue based on the below post.

https://www.telerik.com/forums/textbox-rotate-angles

 

Any help ?

 

Thanks in advanced.

Dimitar
Telerik team
 answered on 18 Jan 2024
1 answer
28 views

Hello,

Looking for a formula to get the previous Monday and Sunday dates for default report parameters. I assume something similar to this but cannot get figure it out. 

Formula below is the last day of the year. I can't figure out how to make it previous Monday. 

= Today().AddDays(CDbl(- Today().Day))

 

Thanks in advanced

Dimitar
Telerik team
 answered on 17 Jan 2024
1 answer
25 views

Hello,

can I disable Expressions on a TextBox? I am using Telerik Reporting in a C# Project.

I have a TextBox in my Report that has its value set to a string in the Reports code. If the string starts with an "=", the entire string is treated as an expression and is calculated in the rendered Report. Is there a way to display the raw text in the Report TextBox with a "=" at the start and without any calculations applied?

Addind Quotation marks to the string in C# code does not seem to work, as it now adds these Quotation marks to the rendered TextBox.

Thanks.

Niklas
Top achievements
Rank 1
Iron
 answered on 11 Jan 2024
1 answer
269 views

 I am using Telerik report in my c# project using their REST service, I am using the R1 2017 version, the parameters are all loading and their respective data from the database is also loading but I am getting this error when I click on preview,

When I analyzed the Telerik DLL with the error it meant that the parameters values list is null, but it can't be because I checked the network log, all the parameters are being passed to the REST API. This is the payload I'm sending

{"report":"Activity/Registered Users Report.trdp/VisionReport","parameterValues":{"CPR":"353464654","EMAIL":"","MOBILE":"","FromDate":"2023-12-31T00:00:00.000Z","ToDate":"2024-01-01T00:00:00.000Z","ChannelId":["006","002","005"]}}

to this telerik URL :

https://localhost:44302/api/reports/clients/aaf42228070/instances

When I run the same code and report in my local environment it runs properly. Still, when I deploy the code to the server, I receive this error, I ran the report on Telerik Designer on the server, there also it loads fine, it only causes issues when I am loading it in the browser on the server. Following is the complete error I'm receiving from Telerik.

 {message: "An error has occurred.", exceptionMessage: "Value cannot be null. ↵Parameter name: source",…}
    exceptionMessage
    : 
    "Value cannot be null.\r\nParameter name: source"
    exceptionType
    : 

"System.ArgumentNullException"
message
: 
"An error has occurred."
stackTrace
: 
"   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__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.ExceptionServices.ExceptionDispatchInfo.Throw()\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.ExceptionServices.ExceptionDispatchInfo.Throw()\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.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   
 at System.Web.Http.Filters.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore>d__3.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   
 
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n  
 at System.Web.Http.Controllers.ExceptionFilterResult.<ExecuteAsync>d__6.MoveNext()
Top users last month
Dominik
Top achievements
Rank 1
Giuliano
Top achievements
Rank 1
Dominic
Top achievements
Rank 1
Glendys
Top achievements
Rank 1
NoobMaster
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?