My need is to format numbers according to a custom culture with custom decimal, group symbols and number of decimal digits. For this I've created a custom CultureInfo object and set it up on Report.Culture property in a IReportSourceResolver implementation - I am using ASP.NET from .net 5 example. For some reason, most of the NumberFormatInfo properties are ignored and a default, specific to the underlying culture code, is used.
I need to programmatically change the NumberFormatInfo, because the service that is using Telerik Reporting is working in a multi tenant / multi culture environment and it must use the same report template but with different cultures for different requests.
Current result:
123 456 789
123 456 789,012
123 456 789 €
123 456 789,01 €
Desired result, as per NumberFormatInfo settings (seen also in console):
123#456#789
123#456#789*01235
123##456##789 E
123##456##789**012346 E
Documentation reference:
https://docs.telerik.com/reporting/designing-reports-report-globalization
"A report is globalized with the help of a System.Globalization.CultureInfo object. You can specify a Culture for the entire Telerik.Reporting.Report by setting its Report.Culture property. This will force all Telerik.Reporting.TextBox items to respect the assigned Culture."
But this does not appear to fully work. NumberFormatInfo of the Report.Culture property is not considered.
I've attached a project that reproduces this issues.
Generated PDFs do not have bookmarks in R2 2021 unless there is a TOC section in the report.
By setting the device info setting "ProcessItemActions", the generated PDFs have bookmarks again.
var reportProcessor = new Telerik.Reporting.Processing.ReportProcessor();
var reportSource = new Telerik.Reporting.UriReportSource();
reportSource.Uri = "some Uri";
var deviceInfo = new System.Collections.Hashtable();
deviceInfo["ProcessItemActions"] = true;
reportProcessor.RenderReport("PDF", reportSource, deviceInfo);
Cannot provide a valid design-time value for multivalue report parameter and thus cannot preview the data and check whether the query is returning anything. When using a multivalue report parameter of type Int, you may get the following error:
Failed to convert parameter value from a String to a Int32
This does not in any way affect the runtime behavior of the report and if the query is correct, the data is retrieved at runtime, and the report loads as expected.
I followed How to set up in Blazor application | Telerik Reporting
All done! But when it run i got an error "telerikWebReportDesignerInterop.js 404"
<script src="_content/telerik.webreportdesigner.blazor/telerikWebReportDesignerInterop.js" defer></script>and in console show:
fail: Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost[111]
Unhandled exception in circuit 'Gyr8E4g_PwQHf7G2UKY2h3obMpujPfFp2x9i7dkB4oQ'.
Microsoft.JSInterop.JSException: Could not find 'telerikWebReportDesignerInterop.createWebReportDesignerWidget' ('telerikWebReportDesignerInterop' was undefined).
Error: Could not find 'telerikWebReportDesignerInterop.createWebReportDesignerWidget' ('telerikWebReportDesignerInterop' was undefined).
at https://localhost:5001/_framework/blazor.server.js:1:67713
at Array.forEach (<anonymous>)
at e.findFunction (https://localhost:5001/_framework/blazor.server.js:1:67673)
at v (https://localhost:5001/_framework/blazor.server.js:1:69415)
at https://localhost:5001/_framework/blazor.server.js:1:70361
at new Promise (<anonymous>)
at e.beginInvokeJSFromDotNet (https://localhost:5001/_framework/blazor.server.js:1:70334)
at https://localhost:5001/_framework/blazor.server.js:1:26441
at Array.forEach (<anonymous>)
at e.invokeClientMethod (https://localhost:5001/_framework/blazor.server.js:1:26411)
at Microsoft.JSInterop.JSRuntime.InvokeAsync[TValue](Int64 targetInstanceId, String identifier, Object[] args)
at Microsoft.JSInterop.JSRuntimeExtensions.InvokeVoidAsync(IJSRuntime jsRuntime, String identifier, Object[] args)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle)Telerik Reporting 15.1.21.616
<PackageReference Include="Telerik.Reporting.Services.AspNetCore" Version="15.1.21.616" />
<PackageReference Include="Telerik.Reporting.OpenXmlRendering" Version="15.1.21.616" />
<PackageReference Include="Telerik.ReportViewer.Blazor" Version="15.1.21.616" />
<PackageReference Include="Telerik.WebReportDesigner.Blazor" Version="15.1.21.616" />
<PackageReference Include="Telerik.WebReportDesigner.Services" Version="15.1.21.616" />Startup.cs
namespace CSharp.Net5.BlazorIntegrationDemo
{
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Microsoft.Extensions.Hosting;
using System;
using Telerik.Reporting.Cache.File;
using Telerik.Reporting.Services;
using Telerik.WebReportDesigner.Services;
public class Startup
{
public Startup(IConfiguration configuration)
{
this.Configuration = configuration;
}
public IConfiguration Configuration { get; }
// This method gets called by the runtime. Use this method to add services to the container.
// For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940
public void ConfigureServices(IServiceCollection services)
{
services.AddControllers();
services.AddRazorPages()
.AddNewtonsoftJson();
services.AddServerSideBlazor();
// Configure dependencies for ReportsController.
services.TryAddSingleton<IReportServiceConfiguration>(sp =>
new ReportServiceConfiguration
{
ReportingEngineConfiguration = sp.GetService<IConfiguration>(),
HostAppId = "Net5BlazorDemo",
Storage = new FileStorage(),
ReportSourceResolver = new UriReportSourceResolver(System.IO.Path.Combine(sp.GetService<IWebHostEnvironment>().ContentRootPath, "..", "..", "..", "..", "Report Designer", "Examples")),
});
// Configure dependencies for ReportDesignerController.
services.TryAddSingleton<IReportDesignerServiceConfiguration>(sp => new ReportDesignerServiceConfiguration
{
DefinitionStorage = new FileDefinitionStorage(
System.IO.Path.Combine(sp.GetService<IWebHostEnvironment>().ContentRootPath, "..", "..", "..", "..", "Report Designer", "Examples")),
SettingsStorage = new FileSettingsStorage(
System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "Telerik Reporting")),
ResourceStorage = new ResourceStorage(
System.IO.Path.Combine(sp.GetService<IWebHostEnvironment>().ContentRootPath, "..", "..", "..", "..", "Report Designer", "Examples", "Resources"))
});
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
else
{
app.UseExceptionHandler("/Error");
}
app.UseStaticFiles();
app.UseRouting();
app.UseEndpoints(endpoints =>
{
endpoints.MapControllers();
endpoints.MapBlazorHub();
endpoints.MapFallbackToPage("/_Host");
});
}
/// <summary>
/// Loads a reporting configuration from a specific JSON-based configuration file.
/// </summary>
/// <param name="environment">The current web hosting environment used to obtain the content root path</param>
/// <returns>IConfiguration instance used to initialize the Reporting engine</returns>
static IConfiguration ResolveSpecificReportingConfiguration(IWebHostEnvironment environment)
{
// If a specific configuration needs to be passed to the reporting engine, add it through a new IConfiguration instance.
var reportingConfigFileName = System.IO.Path.Combine(environment.ContentRootPath, "reportingAppSettings.json");
return new ConfigurationBuilder()
.AddJsonFile(reportingConfigFileName, true)
.Build();
}
}
}
WebReportDesignerDemo.razor
@page "/webreportdesigner"
@using Telerik.WebReportDesigner.Blazor
<style>
#wrd1 {
position: relative;
height: 880px;
padding-right: 50px;
}
</style>
@* Create the WebReportDesignerWidget *@
<p>This Web Report Designer instance works with reports hosted locally using the Reporting REST service. For more information, visit the <a target="_blank" href="https://docs.telerik.com/reporting/web-report-designer">Web Report Designer</a> article.</p>
<WebReportDesigner DesignerId="wrd1"
ServiceUrl="/api/reportdesigner"
Report="Dashboard.trdp"
ToolboxArea="new ToolboxAreaOptions() { Layout = ToolboxAreaLayout.List }"
PropertiesArea="new PropertiesAreaOptions() { Layout = PropertiesAreaLayout.Categorized }" />I've noticed an issue with the web service data source configuration window when using jQuery version 3.5.1 or higher.
When you use the click on the Web Service Data Source from the left side menu it will open the configuration window in which Responding encoding and Data selector fields will be there for the jQuery version 3.3.1.
Now try the same steps with the 3.5.1 jQuery version or higher and those 2 fields won't be there.
The padding statement works when the report is run in the designer, but not in the HTML MVC report view.
It looks like the padding is applied to the second line and not where it is placed.
In other words, it works when viewed in the designer, but not in the website.
= "<span style='padding-top: 30px'>" + Fields.FirstName + " " + Fields.LastName +
IIf(Len(Fields.Title)>=1, ", " + HtmlEncode(Fields.Title), "") + "</span><br>" +
"<u>Email</u>: " + IsNull(Fields.EmailAddress, "") + "<br>" +
"<u>Phone</u>: " + IsNull(Fields.Phone, "") + "<br>" +
"<u>Cell</u>: " + IsNull(Fields.Cell, "")
//Designer
//HTML Viewer
Adding a Parent Group to another Column Group in a Crosstab leads to "Object reference not set to an instance of an object" on report preview. Stack Trace:
Object reference not set to an instance of an object. at Telerik.Reporting.Processing.Table.ForEachCell(Action`1 action) at Telerik.Reporting.Processing.Table.MeasureDataItemContent(IMeasureContext context, SizeLU availableClientSize) at Telerik.Reporting.Processing.DataItem.MeasureContent(IMeasureContext context, SizeLU availableClientSize) at Telerik.Reporting.Processing.LayoutElement.MeasureCore(IMeasureContext context, SizeLU availableSize) at Telerik.Reporting.Processing.VisualElement.MeasureCore(IMeasureContext context, SizeLU availableSize) at Telerik.Reporting.Processing.ProcessingElement.MeasureCore(IMeasureContext context, SizeLU availableSize) at Telerik.Reporting.Processing.AbsolutePositionLayout.MeasureChildItems(IMeasureContext context, SizeLU availableClientSize) at Telerik.Reporting.Processing.AbsolutePositionLayout.MeasureContent(IMeasureContext context, SizeLU availableClientSize) at Telerik.Reporting.Processing.ReportSectionBase.MeasureContent(IMeasureContext context, SizeLU availableClientSize) at Telerik.Reporting.Processing.LayoutElement.MeasureCore(IMeasureContext context, SizeLU availableSize) at Telerik.Reporting.Processing.VisualElement.MeasureCore(IMeasureContext context, SizeLU availableSize) at Telerik.Reporting.Processing.ProcessingElement.MeasureCore(IMeasureContext context, SizeLU availableSize) at Telerik.Reporting.Processing.StackLayout.MeasureContent(IMeasureContext context, SizeLU availableClientSize) at Telerik.Reporting.Processing.Group.MeasureContent(IMeasureContext context, SizeLU availableClientSize) at Telerik.Reporting.Processing.LayoutElement.MeasureCore(IMeasureContext context, SizeLU availableSize) at Telerik.Reporting.Processing.VisualElement.MeasureCore(IMeasureContext context, SizeLU availableSize) at Telerik.Reporting.Processing.ProcessingElement.MeasureCore(IMeasureContext context, SizeLU availableSize) at Telerik.Reporting.Processing.StackLayout.MeasureContent(IMeasureContext context, SizeLU availableClientSize) at Telerik.Reporting.Processing.Report.MeasureContent(IMeasureContext context, SizeLU availableClientSize) at Telerik.Reporting.Processing.LayoutElement.MeasureCore(IMeasureContext context, SizeLU availableSize) at Telerik.Reporting.Processing.VisualElement.MeasureCore(IMeasureContext context, SizeLU availableSize) at Telerik.Reporting.Processing.ProcessingElement.MeasureCore(IMeasureContext context, SizeLU availableSize) at Telerik.Reporting.Processing.LayoutElement.Measure(IMeasureContext context, SizeLU availableSize) at Telerik.Reporting.Processing.LayoutElement.MeasureElement(LayoutElement elementToMeasure, SizeLU availableSize, IMeasureContext context) at Telerik.Reporting.ImageRendering.ImageReportInteractive.MeasureRootCore(LayoutElement root, PageSettings pageSettings) at Telerik.Reporting.BaseRendering.RenderingExtensionBase.Render(LayoutElement root, Hashtable renderingContext, Hashtable deviceInfo, CreateStream createStreamCallback, EvaluateHeaderFooterExpressions evalHeaderFooterCallback, PageSettings pageSettings) at Telerik.Reporting.BaseRendering.RenderingExtensionBase.Render(Report report, Hashtable renderingContext, Hashtable deviceInfo, CreateStream createStreamCallback, EvaluateHeaderFooterExpressions evalHeaderFooterCallback) at Telerik.Reporting.Processing.ReportProcessor.RenderCore(ExtensionInfo extensionInfo, IList`1 processingReports, Hashtable deviceInfo, IRenderingContext renderingContext, CreateStream createStreamCallback) at Telerik.ReportViewer.Common.ReportRenderer.Render(ReportRendererArgs args)
The parameter editors with Available Values are pushed down by the buttons 'clear selection'/'select all'. This makes them misaligned with respect to the parameters without Available Values:

The Margins property cannot be set in the Blazor wrapper of the Web Report Designer:
When a report is open and the user click on the "generate" button, a busy indicator is displayed and the user can continue to use the application during the generation of the report. The UI thread is not blocked.
But when opening a view with the ReportViewer, the UI freezes during the initial connection to the remote engine, until the report is ready to be generated. If the report has parameters requiring a database query to load the available values, it freezes for a few seconds.
Would it be possible to load the ReportViewer instantly, then display a busy indicator until the report is ready, without blocking the UI thread ? (exactly as for the generation of the report)
DataPointStyle's initial color is displayed as Black but the color is actually Transparent and if I try to set borders between the data points on my graph, they cannot be seen.
Reselecting a color fixes the issue.