Telerik Forums
Reporting Forum
1 answer
61 views

The MultiValue drop-down/list is not working correctly. We are using version 18.0.24.130.

If you select all values, it works correctly except the values are not highlighted to indicate they are selected. 

If you select individual values on a required parameter, the message "Please input a valid value" does not go away and the Preview button remains disabled. If you select individual values on a non-required parameter, they are properly highlighted, but when you click Preview, the report ignores them / does not use them to filter the results.

This happens for every report, regardless of who develops it, wherever the multi-value parameter is used. 

Our sites using  15.2.21.915 does not have this issue. 

Thanks!

Todor
Telerik team
 answered on 26 Mar 2025
1 answer
105 views

I have a program that is installed in C:\Program Files (x86)\Qiagen\PGxUtils and I am using the code below to render reports by passing the full path of the report template to the function. This works fine when it is a single standalone report but when I try to use a report with subreports I get the following:

Could not find file 'C:\Program Files (x86)\Qiagen\PGxUtils\SubFinalReportV1_PatientDemographics.trdp'., 
Could not find file 'C:\Program Files (x86)\Qiagen\PGxUtils\SubFinalReportV1_Header.trdp'., 
Could not find file 'C:\Program Files (x86)\Qiagen\PGxUtils\SubFinalReportV1_PrescribingInsights.trdp'., 
Could not find file 'C:\Program Files (x86)\Qiagen\PGxUtils\SubFinalReportV1_RiskManagement.trdp'., 
Could not find file 'C:\Program Files (x86)\Qiagen\PGxUtils\SubFinalReportV1_Medication.trdp'., 
Could not find file 'C:\Program Files (x86)\Qiagen\PGxUtils\SubFinalReportV1_TestResult.trdp'.

 

Reading the online documentation this seems to be by design but I need to know how to work around it in order to use subreports.

using Telerik.Reporting;
using System.Text.Json.Nodes;
using System.Text.Json;

namespace PdfReportBuilder
{
    public static class TelerikReportBuilder
    {
        public static ReportSource GetReportSource(string reportPath, JsonNode jsonNode)
        {
            var reportPackager = new ReportPackager();
            using (var sourceStream = System.IO.File.OpenRead(reportPath))
            {
                Report report = (Report)reportPackager.UnpackageDocument(sourceStream);
                var jsonDataSources = report.GetDataSources().OfType<JsonDataSource>();
                foreach (var jsonDataSource in jsonDataSources)
                {
                    jsonDataSource.Source = jsonNode.ToJsonString(new System.Text.Json.JsonSerializerOptions { WriteIndented = true });
                    // This proves that Source can be assigned a json string, assigning a JsonNode doesn't work.
                    // JsonNode? tmp = JsonNode.Parse((jsonDataSource.Source as string)!);
                    // jsonDataSource.Source = tmp.ToJsonString(new System.Text.Json.JsonSerializerOptions { WriteIndented = true });
                }
                return new InstanceReportSource
                {
                    ReportDocument = report
                };
            }
        }

        public static byte[] BuildReport(string reportPath, JsonNode jsonNode)
        {
            var reportProcessor = new Telerik.Reporting.Processing.ReportProcessor();

            // set any deviceInfo settings if necessary
            var deviceInfo = new System.Collections.Hashtable();

            ReportSource reportSource = GetReportSource(reportPath, jsonNode);

            Telerik.Reporting.Processing.RenderingResult result = reportProcessor.RenderReport("PDF", reportSource, deviceInfo);

            if (!result.HasErrors)
            {
                return result.DocumentBytes;
            }
            else
            {
                throw new Exception(string.Join(", ", result.Errors.Select(ex => ex.Message)));
            }
        }

        public static byte[] BuildReport(string templatePath, JsonElement root)
        {
            JsonNode? jsonNode = JsonNode.Parse(root.GetRawText());
            if (jsonNode == null)
            {
                throw new ArgumentNullException(nameof(jsonNode), "Parsed JsonNode cannot be null.");
            }
            return BuildReport(templatePath, jsonNode);
        }
    }
}
Petar
Telerik team
 answered on 21 Mar 2025
0 answers
96 views
1 answer
72 views

On Windows I am able to set the background image of a textbox with the following code:


using (var surface = SkiaSharp.SKSurface.Create(new SkiaSharp.SKImageInfo(100, 100)))
{
    Telerik.Reporting.Processing.TextBox textbox;

    using (var image = surface.Snapshot())
    using (var data = image.Encode())
    {
        byte[] imageData = data.ToArray();
 
        using (var ms = new MemoryStream(imageData))
        {
            textbox.Style.BackgroundImage.ImageData = System.Drawing.Image.FromStream(ms);
        }
    }
}

Image.FromStream has the following error:

"CA1416: This call site is reachable on all platforms. 'Image.FromStream(Stream)' is only supported on: 'windows' 6.1 and later."

What is the Linux compatible version of Image.FromStream()?

Petar
Telerik team
 answered on 21 Mar 2025
0 answers
115 views

We are currently generating TRDX reports using the Telerik Report Designer tool, saving the XML output to a database. When a user runs a report, we retrieve the report XML, update the parameters, and then render the report using the Report Processor. However, we now need to export the report into multiple Excel tabs.

One potential solution is to use Report Book, which is stored in a TRBP file, but we're having trouble reading the contents of this file. Are there any alternative approaches we could take to achieve this functionality?

 
Rajesh
Top achievements
Rank 1
 asked on 20 Mar 2025
1 answer
137 views
We recently upgraded to latest version of Telerik Report Server. When using the standalone report designer if I turn off the autorun feature on the report and do a preview it works fine. But when I publish the report to our report server it doesn't seem to recognize this feature. Is there something we need to change on the server side to make this work? And is there a way to customize the wording displayed when report first opens?
0 answers
107 views

I have a standalone report that gets all the data from the table.  I added a bitmask filter to my SQL query, and I get the results I expect in SQL Studio.

SELECT 
    [Item],
    STRING_AGG([RuleNo], ', ') WITHIN GROUP (ORDER BY [RuleSort]) AS GroupedRuleNos
FROM [SFB_Annex].[dbo].[tblAnnex01]
LEFT JOIN [SFB_Annex].[dbo].[tblProducts] ON [tblAnnex01].[ProductID] = [tblProducts].[ProductID]
WHERE ([tblProducts].[QuadrantBitMask] & 32) != 0
GROUP BY [Item]
ORDER BY [Item];

When I try to add the bit mask as a filter, I keep getting an error "Cannot perform '<>' operation on System.Boolean and System.String."

Here is the filter I am trying to use:

                    Telerik.Reporting.Filter filter = new Telerik.Reporting.Filter();
                    filter.Expression = "=([tblProducts].[QuadrantBitMask] AND " + QuadrantBitMask.ToString() + ")";
                    filter.Operator = Telerik.Reporting.FilterOperator.NotEqual;
                    filter.Value = "!=0";
                    report.Filters.Add(filter);

How would I add the bitmasked value into the filter?

 

Ken
Top achievements
Rank 1
 asked on 15 Mar 2025
1 answer
109 views
âžœ  Local:   http://localhost:5173/
  âžœ  Network: use --host to expose
  âžœ  press h + enter to show help
X [ERROR] Could not resolve "@progress/kendo-react-intl"

    node_modules/@progress/kendo-react-buttons/toolbar/tools/ToolbarOverflowSection.mjs:13:37:
      13 │ import { useLocalization as O } from "@progress/kendo-react-intl";
         â•µ                                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  You can mark the path "@progress/kendo-react-intl" as external to exclude it from the bundle,
  which will remove this error and leave the unresolved path in the bundle.

X [ERROR] Could not resolve "@progress/kendo-react-intl"

    node_modules/@progress/kendo-react-buttons/toolbar/tools/ToolbarScrollButton.mjs:10:37:
      10 │ import { useLocalization as f } from "@progress/kendo-react-intl";
         â•µ                                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  You can mark the path "@progress/kendo-react-intl" as external to exclude it from the bundle,
  which will remove this error and leave the unresolved path in the bundle.

C:\Users\anupa\Desktop\kendoReact\node_modules\esbuild\lib\main.js:1477
  let error = new Error(text);
              ^

Error: Build failed with 2 errors:
node_modules/@progress/kendo-react-buttons/toolbar/tools/ToolbarOverflowSection.mjs:13:37: ERROR: Could not resolve "@progress/kendo-react-intl"
node_modules/@progress/kendo-react-buttons/toolbar/tools/ToolbarScrollButton.mjs:10:37: ERROR: Could not resolve "@progress/kendo-react-intl"
    at failureErrorWithLog (C:\Users\anupa\Desktop\kendoReact\node_modules\esbuild\lib\main.js:1477:15)
    at C:\Users\anupa\Desktop\kendoReact\node_modules\esbuild\lib\main.js:946:25
    at C:\Users\anupa\Desktop\kendoReact\node_modules\esbuild\lib\main.js:1355:9
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5) {
  errors: [Getter/Setter],
  warnings: [Getter/Setter]
}

Node.js v22.11.0
Plamen
Telerik team
 updated answer on 14 Mar 2025
1 answer
47 views

 

 

I'm getting below error while installing Telerik Reporting 2024 Q1 (18.0.24.130) Installation Error. I have downloaded the .msi file from Telerik site. Kindly Help.

 

 

Momchil
Telerik team
 answered on 13 Mar 2025
1 answer
105 views

I have been following the tutorials on creating PDFs of existing reports.  I have a function where I pass in the path name to the report (TRDP file).

Can you add filter or parameter to the report?

 

            ReportProcessor reportProcessor = new ReportProcessor();
            Telerik.Reporting.UriReportSource uriReportSource = new Telerik.Reporting.UriReportSource();
            uriReportSource.Uri = reportPathName;

            //uriReportSource.Parameters.Add();

            Console.WriteLine("Rendering Report " + Path.GetFileName(reportPathName));
            RenderingResult result = reportProcessor.RenderReport("PDF", uriReportSource, null);
            Console.WriteLine("Done Rendering Report " + Path.GetFileName(reportPathName));

            bool success = !result.HasErrors;
Petar
Telerik team
 answered on 11 Mar 2025
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
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?