Telerik Forums
Reporting Forum
1 answer
90 views
buen dia, necesito ayuda, quiero programar un boton para que telerik me mande un reporte periódicamente, pero no se como hacerlo ayudenme porfavor 😞
Dimitar
Telerik team
 answered on 23 Aug 2023
1 answer
934 views

We have many Telerik reports that are fed from SQL Server stored procedures, some of which pull from columns with a type of decimal(38,18) (SQL's max). The system that interacts with these reports uses C# and we limit the values for those columns to 28 significant figures (C#'s max).

 

For example, these values would not be supported by our system:

  • 12,345,678,901.123456789012345678 (11 LHS digits + 18 decimals = 29 total digits)
  • 12,345,678,901,234,567,890.123456789 (20 LHS digits + 9 decimals = 29 total digits)

 

While these would be:

  • 12,345,678,901,234,567,890.12345678 (20 LHS digits + 8 decimals = 28 total digits)
  • 1,234,567,890.123456789012345678 (10 LHS digits + 18 decimals = 28 total digits)

 

We're running into some "Conversion overflows" errors with numbers that have <= 28 significant digits, which after troubleshooting we found to be occurring in Telerik's internal SQL processing, specifically in the System.Data.SqlClient library. Which has this ticket logged: https://github.com/dotnet/SqlClient/issues/95

 

Our system uses Microsoft.Data.SqlClient, which correctly handles truncating trailing zeros.

 

Is there any option for Telerik using the Microsoft.Data.SqlClient library rather than the System.Data.SqlClient library or any other workaround available for this issue? 

 

Here is the full stack trace:

System.OverflowException: Conversion overflows.

   at System.Data.SqlClient.SqlBuffer.get_Decimal()

   at System.Data.SqlClient.SqlBuffer.get_Value()

   at System.Data.SqlClient.SqlDataReader.GetValues(Object[] values)

   at Telerik.Reporting.Processing.Data.SqlDataEnumerable.ReadValues(IDataReader reader)

   at Telerik.Reporting.Processing.Data.SqlDataEnumerable.GetEnumerator()+MoveNext()

   at Telerik.Reporting.Processing.Data.LazyList`1.LazyListEnumerator.MoveNext()

   at System.Collections.Generic.LargeArrayBuilder`1.AddRange(IEnumerable`1 items)

   at System.Collections.Generic.EnumerableHelpers.ToArray[T](IEnumerable`1 source)

   at Telerik.Reporting.Processing.Data.SeedDataAdapter.Execute(IEnumerable`1 data)

   at Telerik.Reporting.Processing.Data.ResultSetAdapter.Execute(IEnumerable`1 data)

   at Telerik.Reporting.Processing.Data.MultidimentionalDataProvider.Execute(MultidimensionalQuery query)

   at Telerik.Reporting.Processing.DataItemResolveDataAlgorithm.GetDataCore(IDataSource dataSource, MultidimensionalQuery query, IServiceProvider serviceProvider, EvalObject expressionContext, IProcessingContext processingContext)

   at Telerik.Reporting.Processing.Report.GetDataCore(IDataSource dataSource, MultidimensionalQuery query)

   at Telerik.Reporting.Processing.DataItemResolveDataAlgorithm.ResolveData(String processingId, InMemoryState inMemoryState, MultidimensionalQuery query, Func`1 getDataCore, EvalObject expressionContext)

   at Telerik.Reporting.Processing.Report.ResolveData()

   at Telerik.Reporting.Processing.Report.ProcessItemCore()

   at Telerik.Reporting.Processing.Report.ProcessItem()

   at Telerik.Reporting.Processing.ReportItemBase.ProcessElement()

   at Telerik.Reporting.Processing.ProcessingElement.Process(IDataMember dataContext)

Dimitar
Telerik team
 answered on 23 Aug 2023
2 answers
278 views

Hi support team,

Currently I have 3 reports called A, B, C with format *.trdp

I used CustomReportResolver to bind datasource for these reports. The problem is I have to use if else condition to know which report is A or B or C to get and bind correct data to the report. Imagine I have 100 reports it will be nightmare for me.

Do we have any way to resolve this or any way to get data source at run time for Standalone Report except the way I described above ?

NOTE: Before I used Visual Studio Report Designer and use NeedDataSource event in each report to get data for them now I have this issue when migrate to Standalone Report Designer.

Example Code:

public ReportSource Resolve(string reportId, OperationOrigin operationOrigin, IDictionary<string, object> currentParameterValues)
{
    var reportPath = Path.Combine(this.ReportsPath, reportId);
    var reportPackager = new ReportPackager();

    Report report = null;
    using (var sourceStream = File.OpenRead(reportPath))
    {
        report = (Report)reportPackager.Unpackage(sourceStream);
    }

    if (reportId == "A")
    {
        if (operationOrigin == OperationOrigin.GenerateReportDocument)
        {
            report.DataSource = GetDataForReportA();
        }        
    }
  else if (reportId == "B")
    {
        if (operationOrigin == OperationOrigin.GenerateReportDocument)
        {
            report.DataSource = GetDataForReportB();
        }        
    }
else if (reportId == "C")
    {
        if (operationOrigin == OperationOrigin.GenerateReportDocument)
        {
            report.DataSource = GetDataForReportC();
        }        
    }

    return new InstanceReportSource
    {
        ReportDocument = report
    };
}


Thanks

Amr
Top achievements
Rank 1
Iron
 updated answer on 23 Aug 2023
2 answers
142 views
I have a report where I define multiple values to be auto-selected in the Report Parameters value Array. All the items in the Array are selected at report run time but one. I can select the one item on the fly, but I cannot figure out why it is not automatically doing it. The string in question is "RA1".  I am adding the report and screenshots.
Michael
Top achievements
Rank 1
Iron
Iron
 updated answer on 21 Aug 2023
1 answer
138 views

Hi,

I have a ReportViewer in WPF where I display a Report Book with Bookmarks.

I have set DocumentMapVisible="False" but still the ReportViewer srtarts with visible DocumentMap.

Do I have to set another value?

Because I set the Report Source programmatically I have also tried to set the DocumentMapVisible to false there again but it changes nothing.

Nikolay
Telerik team
 answered on 17 Aug 2023
1 answer
115 views

Hi,

I have a Report Book with multiple Reports and each of them with multiple subreports.

Each Main-Report (the reports directly in the Report Book) has a BookmarkId set.

If I click on one of the bookmarks in the Document Map (or later in a PDF, it's the same behaviour), it jumps not the the beginning of the first page of the report but a bit scrolled down.

It seems to where the Detailsection begins.

 

So my question:

Is it possible to jump to the Pageheader instead somehow?

 

Greetings
Benedikt

 

Momchil
Telerik team
 answered on 17 Aug 2023
1 answer
450 views

This is using c sharp and wpf. Without using the report designer I need to change the suggested file name that comes up once you choose a file format to export as and it opens the file dialog. Currently my report displays userReport1 as the name. I want to input two strings values of id numbers as the file name instead.

Alternatively if I was to use parameters in the designer to change the name how would I go about that?

Ralitsa
Telerik team
 answered on 17 Aug 2023
1 answer
154 views

Good Evening Telerik,

 

I ran the same report out of Crystal and Telerik. Crystal shows the correct average time. and, Telerik (sometimes?) shows the correct average time. it randomly marks some of them a negative number. (see below) The SQL query is the same between Telerik and Crystal. so maybe I am formatting something wrong in Telerik?

Here is an example of the same exam ran out of both applications. diff results on the average Comp to Prov and Comp to Final

EXAM IDORDERED T/DARRIVED T/DCOMPLETED T/DDICTATED T/DPROVISIONAL T/DFINALIZED T/DComp To ProvComp To FinalReporting Application
A903912J37/1/2023 21:227/1/2023 21:587/1/2023 22:237/2/2023 0:507/2/2023 0:507/2/2023 0:500:02:270:02:27CrystalReporting
A903912J37/1/2023 21:227/1/2023 21:587/1/2023 22:237/2/2023 0:507/2/2023 0:507/2/2023 0:50-21:33:00-21:33:00Telerik Reporting

 

1 answer
532 views

I have a bunch of reports that were created in .net framework 4.7.2 using the Visual Studio report designer (created as .cs files).  I'm upgrading the solution to .net 6.

I've updated to the correct nuget packages for Telerik winforms and Telerik Reporting, and from what I've read, I need to convert all those reports to a format that will work in the standalone report designer.

I moved all the reports to their own class library, built the solution, an then tried to open that library's .dll file in the standalone designer as described here:

https://docs.telerik.com/reporting/designing-reports/report-designer-tools/desktop-designers/standalone-report-designer/how-to-import-reports-created-with-the-vs-report-designer

Every time, I get an error:

System.Reflection.TargetInvocationException... System.IO.FileNotFoundException: Could not load file or assembly 'System.ComponentModel.TypeConverter, Version=6.0.0.0... The system cannot find the file specified.

I cannot find any reference to that in the report files, and I can't find any verion 6.0.0.0 for .net 6 out there to even install.  I did try adding a package reference to a .net std verion, but it's 4.x from 2016.

How can I get past this error so the report can be imported?

 

1 answer
440 views

Hello.

Currently I am designing a report on which I have date and datetime data types.

I have prepared the data-base table with data that goes into the report (attachment data-model.png)

I prepared report template in telerik web report designer (attachment report_template.png)
I set format according to Standard DateTime Format Strings
Field with date data has format {0:d}

On preview (at Web Report Designer) the date seems to be ok (attachment preview.png)

Unfortunately, after exporting the report to excel (xlsx), the date type is not a date in excel (attachment invalid_format.png)

My appsetting.json file contains

"telerikReporting": {
  "extensions": [
    {
      "name": "XLSX",
      "parameters": [
        {
          "name": "UseExtendedFormatting",
          "value": "False"
        }
      ]
    }
  ]
}

 

What should I have to set/do in order to have date format in excel for cells that contain date and date-time data?
I would like to achieve result like below: for cell that contain date data in report I need date format in excel

I would like to emphasize that Standard Numeric Format Strings work:

  • C or c (Currency) works fine
  • N or n (Number) works fine
  • G or g (General) works fine
  • P or p (Percent) works fine

Environment:

  • Visual Studio 2022
  • .NET 6
  • Web report designer written in Razor pages
  • Packages (I know it's not the latest version, but it works the same badly on the latest version)
    • Telerik.Reporting v. 16.2.22.1109 (v2022.3.1109)
    • Telerik.Reporting.OpenXmlRendering v. 16.2.22.1109 (v2022.3.1109)
    • Telerik.WebReportDesigner.Services v. 16.2.22.1109 (v2022.3.1109)
  • jQuery v. 3.6.0
  • Windows culture pl-PL
  • I run my project on IIS
    • IIS version 10
    • culture pl-PL
  • project culture pl-PL
  • I set kendo.culture("pl-PL");
    • culture file https://kendo.cdn.telerik.com/2022.3.1109/js/cultures/kendo.culture.pl-PL.min.js

regards

Momchil
Telerik team
 answered on 09 Aug 2023
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
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?