Telerik Forums
Reporting Forum
1 answer
602 views

I would like to bold one of the If Then Statements, when i convert my text box to an html text box i get an error.  Here is my code.

 

= 'Each of the undersigned (herein referred to individually and collectively as “Owner”) hereby guarantees, represents and warrants to ENTERPRISE Crude Oil, LLC (“ECO”), its successors and assigns, that each Owner is the legal owner of the Owner’s respective interest, in the proportions hereinafter stated, in all Oil (as defined herein) produced and saved from the ' + If(Count(Fields.[Property #]) > 1, "See Exhibit A", Fields.[Property Name])+  ' located in the County of ' + If(Count(Fields.[Owner Name]) > 1, "See Exhibit A", Fields.[County Name] + ', State of ' + Fields.CityState) + ', described as follows (the “Lands”):'

Momchil
Telerik team
 answered on 10 Jul 2023
2 answers
337 views

After upgrading Telerik Reports from version 14.2.20.1021 to 17.0.23.118 we experience Visual Studio crashes when opening the "Expression..." 

editor after the first time.

 

Steps to reproduce:

* Open the report.

* Open the "Expression....". Loads correctly (as above)

* Close the report

* Reopen the same report

* Open the "Expression....". Visual Studio Crashes while showing the editor and shows the following:

Event Viewer shows the following:

OS and Visual Studio Versions

Microsoft Visual Studio Professional 2019 Version 16.11.27

OS : Windows 11 

 

Please advice on how to proceed.

Thanks in advance.

ChrisM
Top achievements
Rank 1
Iron
Iron
 answered on 07 Jul 2023
1 answer
317 views

I want to pass parameters tho the report using  Blazor native viewer. I found some samples with HTML viewer but the code doesn't work for the native viewer. Do you have a sample of how to implement it?

I try implementing a custom resolver but until now it is not working.

Dimitar
Telerik team
 answered on 05 Jul 2023
1 answer
276 views

Hi:

In blazor I have a list of dtos, I want to assing it to a report similar to the process in wpf. How can i Accomplish it? is posible?

I Try with a custom resolver in the server side, but I have to send the thada from the balzor layer to the custom resolver and im not sure if is a good idea.

Thanks in advance.

Dimitar
Telerik team
 answered on 05 Jul 2023
1 answer
321 views

HI,
I have a problem with Telerik Web Report Designer (17.0.23.515) as explained in the documentation I proceeded to create api service controller and the view to host the application but when I run it I get an error poup with the following message :

Could not retrieve information for folder . Warning, model validation error detected!

The error is related to:

request:
"http://localhost/NTTData/KPI/api/reportdesigner/definitionresources/folder/model?uri="
> payload: uri (is empty)
> status: Bad Request
> remote address: [::1]:80
> Referrer Policy: 'strict-origin-when-cross-origin'

response:
{
     "Message": "Warning, model validation error detected!",
     "Errors": [
         "A value is required but was not present in the request."
     ]
}

Do you have any suggestions/info to solve the problem?

P.S: I've verified that the app can read and write to the report folder.

Thank You

Dimitar
Telerik team
 answered on 05 Jul 2023
1 answer
1.7K+ views

Good afternoon, 

 

I'm trying to generate a barcode with GS and RS characters inside a barcode with no success (those are mandatory for GTL labels in VDA standard).

I've been trying to do Char(29), Chr(29), ChrW(29), (char)29, Convert.ToChar(29), ... but nothing worked me.

 

Best regards

Jorge
Top achievements
Rank 1
Iron
 answered on 05 Jul 2023
0 answers
198 views

Hello,

I am getting the following error when trying to print a report from my website:

But when in my local machine, it displays correctly. The database is the same, no changes between then.

Regards,

Alexandre

Alexandre
Top achievements
Rank 2
Iron
Iron
Iron
 asked on 04 Jul 2023
0 answers
167 views

My report viewer was working without issue for some time until caching with DistributedSqlServerCache was implemented. It is configured as follows.

services.TryAddSingleton<IReportServiceConfiguration>(configuration =>
    new ReportServiceConfiguration {
        HostAppId = "Reports",
        ReportingEngineConfiguration = new ConfigurationBuilder().AddJsonFile(Path.Combine(configuration.GetService<IWebHostEnvironment>().ContentRootPath, "appsettings.json"), true).Build(),
        ReportSourceResolver = new UriReportSourceResolver(Path.Combine(configuration.GetService<IWebHostEnvironment>().ContentRootPath, "App_Data")).AddFallbackResolver(new TypeReportSourceResolver()),
        Storage = new MsSqlServerStorage("connection-string")
    }
);
public class ReportsController : ReportsControllerBase {
    public ReportsController(IReportServiceConfiguration reportServiceConfiguration) : base(reportServiceConfiguration) {
        reportServiceConfiguration.Storage.AcquireLock(string.Format("Lock-{0}", new Random().Next()));
    }
}

Note that the AcquireLock() method mentioned above was added in response to this comment from Telerik:

The interface also exposes a method called AcquireLock which is used from the service to enforce serialized access to all stored resources from each thread of the application and between the instances of the application in case of multi-instance environment (i.e., Web Farm)

Which I suspect may apply here, but unfortunately I can only hazard guess in light of its appalling lack of documentation.

A typical error message reported by the viewer is:

Error creating report document (Report = 'XXXXX, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'; Format = 'HTML5'). An error has occurred. Object reference not set to an instance of an object.

As a workaround, I have resorted to manually configuring the report viewer, then editing a method in the javascript file, from this:
function registerDocumentAsync(format, deviceInfo, useCache, baseDocumentId, actionId) {
    throwIfNotInitialized();
    throwIfNoReportInstance();

    return client.createReportDocument(clientId, reportInstanceId, format, deviceInfo, useCache, baseDocumentId, actionId).catch(function(xhrErrorData) {
        handleRequestError(xhrErrorData, utils.stringFormat(sr.errorCreatingReportDocument, [ utils.escapeHtml(report), utils.escapeHtml(format) ]));
    });
}

to this:

function registerDocumentAsync(format, deviceInfo, useCache, baseDocumentId, actionId) {
    throwIfNotInitialized();
    throwIfNoReportInstance();

    return client.createReportDocument(clientId, reportInstanceId, format, deviceInfo, useCache, baseDocumentId, actionId).catch(function () {
        console.log("Failed to create report document. A retry has been attempted.");

        return client.createReportDocument(clientId, reportInstanceId, format, deviceInfo, useCache, baseDocumentId, actionId).catch(function (xhrErrorData) {
            handleRequestError(xhrErrorData, utils.stringFormat(sr.errorCreatingReportDocument, [utils.escapeHtml(report), utils.escapeHtml(format)]));
        });
    });
}
Up until now, the second attempt has worked every time. The odd thing is, after the workaround is applied it can continue to work for some time without failing again, even after loading a different page. Given that I cannot reproduce this issue locally, I suspect there may be a race condition happening.
Steve
Top achievements
Rank 1
 updated question on 03 Jul 2023
3 answers
154 views

Hello,

I have a report wich has one parameter. When I try to pass a new value in javascript it does not accept it, and uses the sample parameter that is inside the report.

Parameter in the Report:

Passing Parameter in Javascript:

Where 'noFichaVistoria' is the variable containing the new parameter value.

Has anyone faced this before?

Alexandre

Nikolay
Telerik team
 answered on 30 Jun 2023
2 answers
167 views

Hi i'm davide, in these days i'm working for a project that requires telerik on windows form c# desktop application.        So i'm trying to figure out what i need to do it but i don't find pretty much anything online, i can't find a solution please help me.

My little exercise consist in asking a year of school (1 to 5) to print only the ones students in that year, cvyear is a int from 0 to 5, I'M ITALIAN SO 1) ANNO = YEAR, classes is a type class, stu is a list of student. CODE:

string year = cvyear.ToString();
            var report1 = new Telerik.Reporting.Report();
            report1.DataSource = null;
            reportViewer1.ReportSource = null;
            var objectDataSource1 = new Telerik.Reporting.ObjectDataSource();
            objectDataSource1.DataSource = null;
            objectDataSource1.DataSource = classes.Stu;
            report1.DataSource = objectDataSource1;
            Telerik.Reporting.ReportParameter reportParameter1 = new Telerik.Reporting.ReportParameter();
            reportParameter1.Name = "yearParam";
            reportParameter1.Text = "Enter Value for year";
            reportParameter1.Type = Telerik.Reporting.ReportParameterType.Integer;
            reportParameter1.AllowBlank = false;
            reportParameter1.AllowNull = false;
            reportParameter1.Value = year;
           
            reportParameter1.Visible = true;
            
            reportParameter1.AvailableValues.DataSource = objectDataSource1;
            reportParameter1.AvailableValues.ValueMember = "= Fields.Anno";
  
            Telerik.Reporting.Filter filter1 = new Telerik.Reporting.Filter();
            filter1.Expression = "= Fields.Anno";
            filter1.Operator = Telerik.Reporting.FilterOperator.Equal;
            filter1.Value = "="+ year;
            

            Telerik.Reporting.InstanceReportSource reportSource = new Telerik.Reporting.InstanceReportSource();
            reportSource.ReportDocument = report1;
            reportViewer1.ReportSource = reportSource;
            reportViewer1.ClearHistory();
            
            reportViewer1.RefreshReport();

 

Davide
Top achievements
Rank 1
Iron
 updated answer on 29 Jun 2023
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?