Telerik Forums
Reporting Forum
1 answer
10 views

I have an app in Blazor that has an embedded designer.

I have the designer in a dialog, and I want to trigger the save command of the designer programatically (when the user clicks the "Aceptar"  dialog button). 
Is there a way to do it?

Momchil
Telerik team
 answered on 08 Apr 2024
1 answer
10 views

I'm trying to build a custom report generator using the web report designer. all the data sources will be web service data sources.

now I need to impose restrictions for using the already created data sources/reports based on the logged-in user privileges.

1. How can I restrict some users from using certain Shared Data sources or accessing specific reports that are created based on their user rights? 

2. how can I get a list of all the web service data sources created programmatically?

 

 

 
1 answer
9 views
When we open a report with Telerik.ReportDesigner.exe we can edit a HTML Text Box in the Design view (like visible in the image here: Overview Design view) and it's also possible to format the text directly by using the In-Place Editor (like here: Editor).

But we miss this WYSIWYG Editor in Telerik.ReportDesigner.Net.exe (v. 18.0.24.130).
We can only edit the text with the HTML tags and it's no longer possible to adjust the style of a single word by selecting the formatting options like bold, italic, font color, etc.

Telerik.ReportDesigner.Net.exe:
Option "Design view" is missing and even if we edit the text directly (not in the Edit Expression Dialog), we always see the HTML tags.



Telerik.ReportDesigner.exe:


Are we missing something or is this not supported anymore by the newest version of the ReportDesigner.Net?
Momchil
Telerik team
 answered on 04 Apr 2024
1 answer
15 views
Good afternoon, we have an API developed in NET 6 that is running on a Linux server.
Using the Telerik Reporting 18.0.24.305 library, when executing the function var report = (Telerik.Reporting.Report)reportPackager.UnpackageDocument(sourceStream), where sourceStream is System.IO.File.OpenRead(ReportPath), we encounter the following error:

Failed to launch 'type:%20Telerik.Reporting.ReportSerialization.Current.ReportSerializable%601[Telerik.Reporting.Report]' because the scheme does not have a registered handler.

However, if the API is executed on a Windows server, it runs correctly.

How can this error be resolved?
Dimitar
Telerik team
 answered on 01 Apr 2024
2 answers
15 views
currently we are using webservice datasource to generate a report but i want to change this datasource from webservicedatasource to jsondatasource, when i manually put the json in inline, its working perfectly but how to pass the data from programatically , as of now we are using telerik.reportserver.httpclient dll and createdocumentdata model to send an data to report but i could not see any fields available in the model to accept json data. Anyone help on this and its a large report it has lot of tables , list ,fields etc
1 answer
22 views

Hi everyone. 

 

We have an extremely frustrating problem we are attempting to solve.

We have a .NET 7 Web Application using a Blazor Server hosting model for reporting. The application is containerized and runs as part of a service via AWS Fargate. We have a series of legacy reports that we have converted to '.trdp' format, several of these reports use a named connection string to interact with RDS (AWS SQL DB).

 

We are using the 'Blazor' reporting solution that is merely a wrapper over the HTML5 reporting. The assembly versions are as follows:

Telerik.Drawing.Skia, 17.2.23.1114 
Telerik.Reporting, 17.2.23.1114 
Telerik.Reporting.OpenXmlRendering, 17.2.23.1114 
Telerik.Reporting.Services.AspNetCore, 17.2.23.1114
Telerik.ReportViewer.Blazor, 17.2.23.1114

As part of our build process - we inject a secrets file into the container definition with the credentials for accessing the db. This is modified during launch to include the correct environment db and db credentials:

if (ConnectionUtility.IsRunningInFargate())
{
    // Create new copy of string in memory so we can modify it
    var connectionString = connectionStrings[Constants.ReportingSqlConnectionKey];
    var databaseUriForEnvironment = ConnectionUtility.GetDatabaseUriForEnvironment();
    var databaseForEnvironment = ConnectionUtility.GetDatabaseForEnvironment();

    // Replace placeholders with values
    var protoConnectionString =
        connectionString!
            .Replace("{0}", databaseUriForEnvironment)
            .Replace("{1}", databaseForEnvironment);

    // Important! - This replaces the 'in-memory' connection string that reports use to interact with the primary db
    connectionStrings[Constants.ReportingSqlConnectionKey] = protoConnectionString.TransformSecret(Constants.SettingClass.ConnectionString);
}


The connection string key isn't important here, but it is used to provide the connection key for each report.; 

The Telerik services are injected:

builder.Services.TryAddSingleton<IReportServiceConfiguration>(sp => new ReportServiceConfiguration
{
    ReportingEngineConfiguration = sp.GetService<IConfiguration>(),
    HostAppId = "X.Reporting",
    Storage = new FileStorage(),
    ExceptionsVerbosity = "detailed",
    ReportSourceResolver =
        new CustomReportSourceResolverWithFallBack(
            new TypeReportSourceResolver()
                .AddFallbackResolver(
                    new UriReportSourceResolver(
                        Path.Combine(
                            GetReportsDir(sp))))),
});

 

The resolver is less important, but for the sake of completion:

using Telerik.Reporting;
using Telerik.Reporting.Services;

namespace X.Reporting.Services
{
    public class CustomReportSourceResolverWithFallBack : IReportSourceResolver
    {
        private readonly IReportSourceResolver? _parentResolver;

        public CustomReportSourceResolverWithFallBack(IReportSourceResolver? parentResolver)
        {
            _parentResolver = parentResolver;
        }

        public ReportSource Resolve(string report, OperationOrigin operationOrigin, IDictionary<string, object> currentParameterValues)
        {
            var reportDocument = ResolveCustomReportSource(report, operationOrigin, currentParameterValues);

            if (null == reportDocument && null != _parentResolver)
            {
                reportDocument = _parentResolver.Resolve(report, operationOrigin, currentParameterValues);
            }

            return reportDocument;
        }


        private ReportSource ResolveCustomReportSource(string reportId, OperationOrigin operationOrigin, IDictionary<string, object> currentParameterValues)
        {
            var reportBook = new ReportBook();
            var splitString = reportId.Split(',').ToList();

            foreach (var report in splitString)
            {
                var uriReportSource = new UriReportSource
                {
                    Uri = $"Reports/{report}.trdp"
                };

                reportBook.ReportSources.Add(uriReportSource);

                if (operationOrigin == OperationOrigin.ResolveReportParameters)
                {
                    reportBook.ReportSources.Add(GetReportParameters(report, currentParameterValues));
                }
            }

            return new InstanceReportSource { ReportDocument = reportBook };
        }

        private ReportSource GetReportParameters(string reportId, IDictionary<string, object> currentParameterValues)
        {
            UriReportSource report = new UriReportSource();

            foreach (var parameterValue in currentParameterValues)
            {
                if (parameterValue.Value is not null and not (string)"standardReport")
                {
                    var par = new Parameter
                    {
                        Name = parameterValue.Key,
                        Value = parameterValue.Value.ToString()
                    };

                    report.Parameters.Add(par);
                    report.Uri = $"Reports/{reportId}.trdp";
                }
            }

            return report;
        }
    }
}

 

90 % of the time, we can render reports without issue. However, there are times where any report that uses a SQL connection seems to be unable to reach our primary database. EF Core (which interacts with the same DB prior to and after rendering reports) seems to never have this issue - even when Telerik does. Both share the exact same connection string. Rendering a report with an included SQL query returns something like the following: 

On occasion, this issue seems to resolve itself after ~5 minutes. Most of time, we need to kill the container instance and restart it a number of times before reports render without issue. I'm confounded why this happens - it 'feels' like the underlying SQL connection is reused.

Any help is appreciated - this has been a critical issue to our clients, we can't keep using this reporting solution without a fix.

Todor
Telerik team
 answered on 27 Mar 2024
1 answer
19 views

We have a JSON dataset (attached) where one of the nodes is a list of products. We are displaying these products in a table in the detail section. This table has the corresponding ProductList Datasource and has 3 columns: "UP", "Total", "Net UP".  We obtain the "UP" and "Total" directly from the DataSource (Fields.[@UP], Fields.[@Total]). To obtain the "Net UP" we need to check all Discounts nodes in the same line that [@Type]= "Comercial" , take the [@Rate] and multiply it with the Fields.[@UP] of that line.

We are trying to do this inserting a table to which we have bound its DataSource to the Fields.Discounts.Discount field in the "Net UP" column. With this we can obtain the [@Rate] of the discount but the problem here is that we can not address the Fields.[@UP] because it is in another context.

Do you have any idea how we can achieve that?

3 answers
224 views

Im getting an "Error creating report document" error when trying to load the report on the published site.. it works just perfectly in local.

i would like to know what should i do in order to get this issue solved.

 

thanks in advance.

Baryalay
Top achievements
Rank 1
Iron
 answered on 25 Mar 2024
1 answer
22 views

Hi,
I am using ASP.NET WEB API ( not .Net Core ) and I try to integrate Web report designer into my ReactJs front-end
Telerik.Reporting version 17.1.23.718

I am using this Configuration

 ReportDesignerServiceConfiguration designerConfigurationInstance = new ReportDesignerServiceConfiguration
 {
     DefinitionStorage = new FileDefinitionStorage(reportsPath),
     SettingsStorage = fs,

     SharedDataSourceStorage = new FileSharedDataSourceStorage(reportsSharedDSPath),
 };

 

It all works when I try to create a Shared Data Source and for the first time I want to bind it to a Wizard Table but when I go to Preview it shows me an error

An error has occurred while processing Table 'table1': Cannot instantiate the referenced DataSource. Value cannot be null.Parameter name: The path to the SharedDataSource asset was null or empty.


And If I save the same report and try to reopen, it doesn't recognize the shared data source and gives me this error:

Unable to retrieve the referenced Shared Data Source for 'sDS_Test1'.

But the shared data source exists and it is in the same place, if I try to manually add it again it will work and recognize it, but again the preview won't work.

Perhaps I have to use a CustomSharedDataSourceResolver ?

CustomSharedDataSourceResolver : Data.ISharedDataSourceResolver

If yes how do I integrate it in my ASP NET project cause I don't have the appsettings.json file to add the section:

I have to use Web.config but I don't understand how to integrate it, I cannot find any documentation for ASP.NET WEB API.

"telerikReporting": {
  "processing": {
    "resourceResolver": {
      // The element below represents an implementation of a Resource resolver that uses a path provider:
      //"provider": "path",
      //"parameters": [
      //  {
      //    "name": "directory",
      //    "value": "c:\\CommonResources\\"
      //  }
      //],

      // The element below represents an implementation of a Resource resolver that uses a custom type provider:
      "provider": "custom",
      "parameters": [
        {
          "name": "typeName",
          "value": "SqlDefinitionStorageExample.CustomResourceResolver, SqlDefinitionStorageExample"
        }
      ]
    },
    "sharedDataSourceResolver": {
      // The element below represents an implementation of a SharedDataSource resolver that uses a path provider:
      //"provider": "path",
      //"parameters": [
      //  {
      //    "name": "directory",
      //    "value": "c:\\CommonSharedDataSources\\"
      //  }
      //],

      // The element below represents an implementation of a SharedDataSource resolver that uses a custom type provider:
      "provider": "custom",
      "parameters": [
        {
          "name": "typename",
          "value": "SqlDefinitionStorageExample.CustomSharedDataSourceResolver, SqlDefinitionStorageExample"
        }
      ]
    }
  }
}


Please help me,
Thanks
Dimitar
Telerik team
 answered on 25 Mar 2024
1 answer
29 views

This may be a dumb question, I apologize in advance.

I was tasked with updating and existing Rest service from .net 4.6.1 to .net 8.

I was going to just create a new one using your template, but it only supports up to .net 4.8.

What am I missing here?

 

Thank you!

Joe

Momchil
Telerik team
 answered on 25 Mar 2024
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?