Telerik Forums
Reporting Forum
0 answers
29 views

I am using reporting 15.2 in Sitefinity 14.3, works great

Updated to sitefinity 15.3 copied over all the reporting assemblies and now it's throwing this error

Cannot access the Reporting REST service. (serviceUrl = '/api/reports/'). Make sure the service address is correct and enable CORS if needed. (https://enable-cors.org)

It's clearly not CORS related, but the 404 not found is weird.  Any thoughts?

 

Request URL
https://dev.x.ca/api/reports/version
Request Method
GET
Status Code
404 Not Found
sitefinitysteve
Top achievements
Rank 2
Iron
Iron
Veteran
 asked on 07 Jul 2025
2 answers
33 views

Hi support team.

I go back to you on this subject because I have a problem as below:

I'm using Telerik Report Designer Standalone for making my report template.

In fact, I have 2 series: 1 barserie and 1 lineserie. In Line serie, I can make any style of DataPointLabel without any problem. However in bar serie, I want to change the color of DataPointLabel as below but it doesn't take in affect, please help me to resolve it

minh
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 04 Jul 2025
1 answer
31 views

Hi team, please help to check this error

Telerik.Reporting.Serialization.SerializerExcepion
  HResult=0x80131500
  Message=The XML serializer cannot resolve type with name: System.ComponentModel.ISite
  Source=Telerik.Reporting
  StackTrace:
   at Telerik.Reporting.Serialization.ObjectReader.ReadValue(Object obj, PropertyDescriptor prop)
   at Telerik.Reporting.Serialization.ObjectReader.ReadAttributes(Object obj, PropertyDescriptorCollection props)
   at Telerik.Reporting.Serialization.ObjectReader.ReadProperties(Object obj)
   at Telerik.Reporting.Serialization.ObjectReader.ReadObject(Type type)
   at Telerik.Reporting.Serialization.ObjectReader.ReadXmlElement(String name)
   at Telerik.Reporting.Serialization.ObjectReader.ReadCollection(Object collection)
   at Telerik.Reporting.Serialization.ObjectReader.ReadProperties(Object obj)
   at Telerik.Reporting.Serialization.ObjectReader.ReadObject(Type type)
   at Telerik.Reporting.Serialization.ObjectReader.ReadXmlElement(String name)
   at Telerik.Reporting.Serialization.ObjectReader.Deserialize(IResourceHandler handler)
   at Telerik.Reporting.JsonSerialization.JsonSerializer.Deserialize(String value)
   at Telerik.Reporting.JsonSerialization.JsonSerializer.Deserialize(StreamReader reader)
   at Telerik.Reporting.JsonSerialization.JsonSerializer.Deserialize(Stream stream)
   at Telerik.Reporting.JsonSerialization.ReportJsonSerializer.Deserialize(Stream stream)
   at MOS.ReportWriter.Web.Core.TelerikExtensions.ReportHelper.LoadReportFromDataWithDatasources(String reportData, List`1 webServiceDataSources) in C:\working\sourcecode\hrs-report\MOS.ReportWriter.Web\Core\TelerikExtensions\ReportHelper.cs:line 110

  This exception was originally thrown at this call stack:
    [External Code]

Inner Exception 1:
InvalidCastException: Invalid cast from 'System.String' to 'System.ComponentModel.ISite'.

When i trying to modify the WebServiceDatasource in the report document with code below


public static Telerik.Reporting.Report LoadReportFromDataWithDatasources(string reportData, List<CustomeWebServiceDataSource> webServiceDataSources)
{
    try
    {
        using MemoryStream stream = new(Convert.FromBase64String(reportData));
        var reportPackager = new ReportPackager();
        Telerik.Reporting.Report reportDocument = (Telerik.Reporting.Report)reportPackager.UnpackageDocument(stream);

        // Filter only WebServiceDataSources
        var originalDataSources = reportDocument.GetDataSources();
        var webServiceSources = originalDataSources.OfType<WebServiceDataSource>().ToList();

        // Match and update existing WebServiceDataSources
        var matchedDataSources = webServiceSources
            .Where(ws => webServiceDataSources.Any(x => x.ServiceUrl == ws.ServiceUrl))
            .ToList();

        var unmatchedCustomSources = webServiceDataSources
            .Where(x => !webServiceSources.Any(ws => ws.ServiceUrl == x.ServiceUrl))
            .ToList();

        var rebuiltDataSources = new List<object>();

        foreach (var ws in matchedDataSources)
        {
            var matchingCustom = webServiceDataSources.FirstOrDefault(x => x.ServiceUrl == ws.ServiceUrl);
            var paramValues = JsonConvert.DeserializeObject<Dictionary<string, object>>(matchingCustom?.ParameterValues);

            var updatedWs = new CustomeWebServiceDataSource
            {
                Name = ws.Name,
                DataEncoding = ws.DataEncoding.CodePage,
                Method = ws.Method.ToString(),
                Parameters = ws.Parameters.Select(p => new DataSourceParameter
                {
                    Name = p.Name,
                    Value = new DataSourceParameterValue { Value = p.Value?.ToString() },
                    WebServiceParameterType = p.WebServiceParameterType.ToString()
                }).ToList(),
                ServiceUrl = ws.ServiceUrl,
                DataSelector = ws.DataSelector
            };

            updatedWs.SetParameterValues(paramValues);
            rebuiltDataSources.Add(updatedWs);
        }

        // Add new unmatched custom sources
        rebuiltDataSources.AddRange(unmatchedCustomSources);

        // Preserve non-WebServiceDataSources
        var otherDataSources = originalDataSources.Where(ds => ds is not WebServiceDataSource);
        rebuiltDataSources.AddRange(otherDataSources);

        // Serialize updated report and inject data sources
        var reportContent = SerializeReportToJson(reportDocument);
        var reportJson = JsonConvert.DeserializeObject<JToken>(reportContent);

        // Use full polymorphic list
        reportJson["DataSources"] = JsonConvert.DeserializeObject<JArray>(JsonConvert.SerializeObject(rebuiltDataSources));
        reportContent = JsonConvert.SerializeObject(reportJson);

        using MemoryStream finalStream = new(System.Text.Encoding.UTF8.GetBytes(reportContent));
        var serializer = new ReportJsonSerializer();
        return (Telerik.Reporting.Report)serializer.Deserialize(finalStream);
    }
    catch
    {
        return null;
    }
}
the error occured at 
return (Telerik.Reporting.Report)serializer.Deserialize(finalStream);
Todor
Telerik team
 answered on 03 Jul 2025
1 answer
39 views

 

Afer update to the newes Version , the context menu spans the full width of the window. see screenshot. its not possible to click a submenu.

how can i fix this?

thanks Thomas

Dimitar
Telerik team
 answered on 30 Jun 2025
1 answer
86 views

The Native Blazor Report Viewer uses Blazor Multiselect by default for multiselect parameters. This becomes very cluttered when many items are selected.

I want to display parameters in a multi-select dropdown list with check boxes, exactly like this: https://demos.telerik.com/aspnet-ajax/combobox/examples/functionality/checkboxes/defaultcs.aspx

The equivalent Blazor demo is more cluttered as selections showing in the select box: https://www.telerik.com/blazor-ui/documentation/knowledge-base/multiselect-checkbox-in-dropdown 

The article here https://docs.telerik.com/reporting/embedding-reports/display-reports-in-applications/web-application/native-blazor-report-viewer/customizing/how-to-create-custom-parameter-editors has an example on how to customize the parameter widget in Native Blazor Report Viewer.

Can anyone here share the code to create a nice clean multi-select dropdown list with check boxes for a parameter in the Native Blazor Report Viewer? 

 

Ivet
Telerik team
 answered on 27 Jun 2025
3 answers
368 views

Hi Telerik reporting support team,

We are looking for a solution to draw 2 series of chart in the same Graph: LineSeries and BarSeries. We did it successfully in Telerik WPF but not in Reporting.

In WPF, we can draw 2 series with 2 datasources in the same Graph.

In Reporting, we tried to draw 2 graphs, the bar overlays on line, but unfortunately, they are not positioned in the same scale (see picture).

image

Do you have any suggestion to us to achieve this behaviour?

 

Many thank for your help,

minh
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 27 Jun 2025
1 answer
29 views

Currently we're using a pictureBox as a Watermark, but this only shows on the first page of the record.

We also created a binding to show/hide the image.

 

When using a real Watermark it is correctly displayed on every page, but we cannot add a binding to conditionally show/hide it.

 

How can we implement a Watermark that both is displayed on every page, but also is only shown on a specific condition?

 

Kind regards.

Ivet
Telerik team
 answered on 27 Jun 2025
2 answers
64 views

We just updated Telerik Reporting to 19.1.25.521.

Our application uses WPF but because of historical reasons, we use the WinForms ReportViewer hosted in a WindowsFormsHost control.

Since the latest update (coming from Telerik Reporting Q1 2025), we get a NullReferenceException when the ReportViewer is about to display the report after loading it.

System.NullReferenceException
  HResult=0x80004003
  Message=Object reference not set to an instance of an object.
  Source=Telerik.ReportViewer.WinForms
  StackTrace:
   at Telerik.ReportViewer.WinForms.Licensing.UiLicensePresenter.ShowWatermark(Action showWatermarkCallback)

It seems to have something to do with Licensing? We have manually placed the [assembly: global::Telerik.Licensing.EvidenceAttribute... declarations for Telerik UI for WPF and Telerik Reporting in the project, as it is instructed in your documentation. The regular Telerik WPF controls work fine in our application.

 

Dimitar
Telerik team
 answered on 25 Jun 2025
1 answer
51 views

I'm trying to generate a report in my Blazor application.

What I’ve done so far:

  • I used the Standalone Report Designer to create a sample report based on JSON data.
  • I saved the report as a .trdp file and embedded it into my Blazor project.
  • Using the Telerik Report Viewer, I was able to display the report successfully in the app.

Now here's what I want to do:

  • I have dynamic JSON data generated within my Blazor application at runtime.
  • I want to use this runtime JSON data to populate the existing .trdp report.

 

2 answers
115 views
Hello,

I created a report using the Standalone Designer (in .trdp format). In the data connection, I configured it to use a shared connection. From within the Designer, everything works fine — I can preview and export to PDF without any issues.

I then created a console project (code shown below) to try exporting the report to PDF.

In the project's configuration file, I added a connection string to use.

However, when executing the following line:


RenderingResult result = reportProcessor.RenderReport("PDF", sourceReportSource, deviceInfo);

I get an error in the Inner Exception:
Keyword not supported: 'host'.

My PostgreSQL connection string is:
"Host=localhost;Port=5432;Database=crp;Username=postgres;Password=****"

But the connection string is correct — it’s exactly the same one I use in the Standalone Designer, where it works without any problem.

If I embed the connection string directly in the report instead of using a shared connection, everything works fine.

Any idea what could be causing this?



        static void Main(string[] args)
        {
            var builder = new ConfigurationBuilder()
                .SetBasePath(Directory.GetCurrentDirectory())
                .AddJsonFile("appsettings.json", optional: false, reloadOnChange: true);

            IConfiguration config = builder.Build();

            string connectionString = config.GetConnectionString("crp");

            string reportName = @"D:\dev\telerik-reporting\reports\report.trdp";

            var reportProcessor = new Telerik.Reporting.Processing.ReportProcessor();

            // set any deviceInfo settings if necessary
            var deviceInfo = new System.Collections.Hashtable();
            var sourceReportSource = new Telerik.Reporting.UriReportSource();
            sourceReportSource.Uri = reportName;
          
            sourceReportSource.Parameters.Add("procedure_id", 6);

            RenderingResult result = reportProcessor.RenderReport("PDF", sourceReportSource, deviceInfo);

            if (!result.HasErrors)
            {
                //string fileName = result.DocumentName + "." + result.Extension;
                string fileName = "file.pdf";
                string path = @"D:\";
                //string path = System.IO.Path.GetTempPath();
                string filePath = System.IO.Path.Combine(path, fileName);

                using (System.IO.FileStream fs = new System.IO.FileStream(filePath, System.IO.FileMode.Create))
                {
                    fs.Write(result.DocumentBytes, 0, result.DocumentBytes.Length);
                }
            }

        }


Andrea
Top achievements
Rank 1
Iron
 answered on 24 Jun 2025
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?