Telerik Forums
Reporting Forum
0 answers
130 views
I laid out in the detail section a form that will be physically printed and I just need the number from the database to appear in the upper right. My goal is for the form to repeat for every row in the database. Currently a table with the database put in the upper right shows all the values in the table and it pushes everything below it down page.
Lawrence
Top achievements
Rank 1
 asked on 03 Dec 2025
1 answer
123 views

This is my declaration in the .cshtml file:

        @(Html.TelerikReporting().ReportViewer()
                .Id("reportViewer1")
                .ServiceUrl(Url.Content("~/api/reports"))
                .ReportSource(new TypeReportSource() { TypeName = "ReportLibrary." + Model.FormReportsModel.ReportID.ToString() + ", ReportLibrary" })
                .ViewMode(ViewMode.Interactive)
                .ScaleMode(ScaleMode.Specific)
                .Scale(1.0)
                .PersistSession(false)
                .PrintMode(PrintMode.AutoSelect)
                .EnableAccessibility(true)
                .ClientEvents(events => events.RenderingBegin("onRenderingBegin"))
                .ClientEvents(events => events.RenderingEnd("onRenderingEnd"))
                .ParameterEditors(
                    editors => editors
                        .CustomEditors(new CustomParameterEditor
                        {
                            MatchFunction        = "customMatch",
                            CreateEditorFunction = "createCustomEditor"
                        })
                )
        )


It's been running fine for years without the "ParameterEditors" bit.  I added that not because I want to really edit a parameter, only because I realized I could change the initial hint:

            function customMatch(p1) {
                if (p1.name === "AccountID")       p1.Error = "Please choose one";
                if (p1.name === "FiscalManyYears") p1.Error = "Please choose at least two";
                return false;
            }

            function createCustomEditor(placeholder, options) {
                // This is not needed, because the previous function never returns TRUE.
            }

which works great on the new report . . . but suddenly all of the other reports are failing, because the [Preview] button never enables, no matter what selections are clicked for the parameters.  If I remove the ".ParameterEditors()" clause, the [Preview] button reverts to behaving as expected.

I would be happy if someone could point out a mistake I'm making.

David
Top achievements
Rank 1
Iron
 updated answer on 03 Dec 2025
1 answer
108 views

Hi,

below here example page

"...\Telerik Reporting 2025 Q3\Examples\CSharp\.NET 8\BlazorIntegrationDemo\Components\Pages\Home.razor"

changed to have runtime ReportSource setting (in original example it is defined in design-time)

 

piece below breaks page execution - it doesn't show report

        // Business logic - long-running request to db or call of far service
        await System.Threading.Tasks.Task.Delay(3000);

 

not working page:

@page "/" @rendermode InteractiveServer @using Telerik.ReportViewer.Blazor @inject IJSRuntime JsInterop <link rel="stylesheet" id="TelerikThemeLink" href="https://kendo.cdn.telerik.com/themes/10.2.0/default/default-ocean-blue.css" /> <style> article.content { height: 100%; } #rv1 { height: 84vh; margin-top: 10px; } .trv-report-viewer { width: 100%; height: 880px; } </style> @* Create the ReportViewerWidget *@ <p>This Blazor Report Viewer instance displays reports hosted locally using the Reporting REST service. For more information, visit the <a target="_blank" href="https://docs.telerik.com/reporting/blazor-report-viewer">Blazor Report Viewer</a> article.</p> <button type="button"class="btn btn-light btn-sm" @onclick="RefreshReport">Refresh Report</button> <button type="button"class="btn btn-light btn-sm" @onclick="Print">Print Report</button> <select @onchange="ChangeTheme" id="theme-switcher"> <option selected value="default-ocean-blue">Default Ocean Blue</option> <option value="default-main">Default Main</option> <option value="default-main-dark">Default Main Dark</option> <option value="default-orange">Default Orange</option> <option value="default-nordic">Default Nordic</option> <option value="default-urban">Default Urban</option> <option value="classic-main">Classic Main</option> <option value="classic-main-dark">Classic Main Dark</option> <option value="classic-moonlight">Classic Moonlight</option> <option value="classic-green">Classic Green</option> <option value="classic-lavender">Classic Lavender</option> <option value="classic-silver">Classic Silver</option> <option value="classic-metro">Classic Metro</option> <option value="classic-metro-dark">Classic Metro Dark</option> <option value="bootstrap-main">Bootstrap Main</option> <option value="bootstrap-vintage">Bootstrap Vintage</option> <option value="material-sky">Material Sky</option> <option value="material-aqua-dark">Material Aqua Dark</option> <option value="material-lime">Material Lime</option> <option value="material-lime-dark">Material Lime Dark</option> </select> <ReportViewer @ref="reportViewer1" ViewerId="rv1" ServiceUrl="/api/reports" ReportSource=@ReportSource Parameters="@(new ParametersOptions { Editors = new EditorsOptions { SingleSelect = EditorType.ListView , MultiSelect = EditorType.ListView} })" ScaleMode="@(ScaleMode.Specific)" Scale="1.0" SendEmail=@(new SendEmailOptions { Enabled = true }) ClientEvents="@(new ClientEventsOptions() { ExportBegin = "trvEventHandlers.exportBegin", ExportEnd = "trvEventHandlers.exportEnd" })" /> @code { ReportViewer reportViewer1; ReportSourceOptions ReportSource { get; set; } protected override async Task OnInitializedAsync() { awaitbase.OnInitializedAsync();

// -----------<ISSUE_HERE>---------------

// Business logic - long-running request to db or call of far service

await System.Threading.Tasks.Task.Delay(3000);

// ------------ </ISSUE_HERE>

 

 

 

this.ReportSource = new ReportSourceOptions { Report = "Report Catalog.trdp", Parameters = new Dictionary<string, object>() // set of predefined parameters { { "ProductCategory", "Clothing" }, { "ProductSubcategory", new [] { "Caps", "Gloves" } } } }; } async void RefreshReport() { await reportViewer1.RefreshReportAsync(); } async void Print() { await reportViewer1.Commands.Print.ExecuteAsync(); } async Task ChangeTheme(ChangeEventArgs e) { // Obtain the Kendo CDN Url values from the dropdown selectionstring? themeIdFull = e.Value asstring; if (String.IsNullOrEmpty(themeIdFull)) { return; } int firstDashIndex = themeIdFull.IndexOf("-", StringComparison.Ordinal); string themeIdBase = themeIdFull.Substring(0, firstDashIndex); // Set the URL to the Kendo theme - it can be a relative URL pointing to a local resource or to a custom themestring newThemeCdnUrl = $"https://kendo.cdn.telerik.com/themes/10.2.0/{themeIdBase}/{themeIdFull}.css"; // call the JS interop that will switch out the <link> elementawait JsInterop.InvokeVoidAsync("changeKendoTheme", new[] { newThemeCdnUrl }); } }


<ReportViewer @ref="reportViewer1"
              ViewerId="rv1"
              ServiceUrl="/api/reports"
              ReportSource=@ReportSource
              Parameters="@(new ParametersOptions { Editors = new EditorsOptions { SingleSelect = EditorType.ListView , MultiSelect = EditorType.ListView} })"
              ScaleMode="@(ScaleMode.Specific)"
              Scale="1.0"
              SendEmail=@(new SendEmailOptions { Enabled = true })
              ClientEvents="@(new ClientEventsOptions() {
                                  ExportBegin = "trvEventHandlers.exportBegin",
                                  ExportEnd = "trvEventHandlers.exportEnd"
                              })" />
@code {
    ReportViewer reportViewer1;
    ReportSourceOptions ReportSource { get; set; }

    protected override async Task OnInitializedAsync()
    {
        await base.OnInitializedAsync();
        
        // Business logic - long-running request to db or call of far service
        await System.Threading.Tasks.Task.Delay(3000);

        this.ReportSource = new ReportSourceOptions
        {
            Report = "Report Catalog.trdp",
            Parameters = new Dictionary<string, object>() // set of predefined parameters
            {
               { "ProductCategory", "Clothing" },
               { "ProductSubcategory", new [] { "Caps", "Gloves" } }
            }
        };
    }

Dimitar
Telerik team
 answered on 26 Nov 2025
1 answer
151 views

I understand that licensing terms for Telerik Reporting have recently changed.

Does this change affect distribution of the Report Designer? I have not found any reference to that in the documentation.  Based on what I had read in your forums, documentation, and blogs in the past, the Report Designer was freely distributable.  I would have expected any change to be reflected in your Licensing FAQ.

Thank you for your clarification.

Best regards, 
Mark

Ivet
Telerik team
 answered on 26 Nov 2025
1 answer
93 views

I have a 2 custom functions but neither seem to work.

I have an Action on a text box control to set Style.Color with these expressions (tried both)

= EIT.EITNumberColourHex( Fields.pnFeesTotal )

I have also tried this

= EIT.EITNumberColour( Fields.pnFeesTotal )

But I get errors saying "Cannot find overload of function ..."

My functions headers are

        [Function(Category = "EITFunctions", Namespace = "EIT", Name = "EITNumberColour", Description = "Returns number colours red,blue or black based on parameters", IsVisible = true)]
        public static System.Drawing.Color EITNumberColour(decimal number, bool useColour = true)

 

        [Function(Category = "EITFunctions", Namespace = "EIT", Name = "EITNumberColourHex", Description = "Returns number colours red,blue or black based on parameters in hex", IsVisible = true)]
        public static string EITNumberColourHex(decimal number, bool useColour = true)
        {

 

Can you anyone advise what am doing incorrectly?

Thanks

John

JOHN
Top achievements
Rank 1
Iron
 answered on 20 Nov 2025
2 answers
659 views

Hello,

installed a new SDK and got

C:\Users\USER\.nuget\packages\telerik.licensing\1.6.5\build\Telerik.Licensing.targets(29,3): error MSB4216: Could not run the "ResolveTelerikProducts" task because MSBuild could not create or connect to a task host with runtime "NET" and architecture "x64".  Please ensure that (1) the requested runtime and/or architecture are available on the machine, and (2) that the required executable "C:\Program Files\dotnet\sdk\9.0.307\MSBuild.dll" exists and can be run.

Works fine with previous SDK 9.0.306.

Any fix?

Todor
Telerik team
 answered on 20 Nov 2025
1 answer
94 views

I'm hoping there's a way to add the additionally supported report export formats such as DOCX, XLSX etc to the Winforms Report Viewer?

I've been able to hide Tiff using the config section, but there seems to be no way (either there or through the Viewer's properties) to allow additional supported formats

Is the only option to hide the export button on the Viewer and implement my own Export?

Petar
Telerik team
 answered on 20 Nov 2025
1 answer
971 views

Hello,

I understand that the team is working hard to support the Report Designer for .NET 8 projects in Visual Studio 2022.  However, may I know whether the Report Designer for .NET Framework 4.8 projects will be supported in Visual Studio 2026?

Thanks.

Deepak Gupta

Ivet
Telerik team
 answered on 18 Nov 2025
1 answer
168 views

Hi, 

I am facing an issue with Telerik Report with C# when assigning a SqlDataSource to a table programmatically in a Telerik Report. The problem occurs only when the stored procedure has parameters — the report returns no data, but it does not throw any exceptions. When the stored procedure has no parameters, everything works correctly.

Environment

  • .NET version: .net 9.0
  • Report Type: TRDP (packaged report)
  • Rendering from C# code (ReportProcessor)

Problem Description

Inside my TRDP report, I locate a Table item at runtime and assign a new SqlDataSource to it. The SqlDataSource uses:

  • A valid SQL Server connection string
  • A stored procedure name
  • A parameter (e.g. @Year)

The issue:

  • When the stored procedure has parameters, the report shows no data even though no exceptions occur.
  • When the stored procedure does NOT have parameters, everything works correctly.
  • Executing the stored procedure in SSMS using the same parameter value returns rows.

Code Example

var table1 = FindItem<Table>(report, "table1");

if (table1 != null)

{

    var dsTable = new Telerik.Reporting.SqlDataSource();

    dsTable.ConnectionString = connectionString!;

    dsTable.SelectCommand = storedProc!; // ex: "dbo.MyReportProc"

    dsTable.SelectCommandType = SqlDataSourceCommandType.StoredProcedure;

 

    // Adding parameter

    dsTable.Parameters.Add("@Year", DbType.Int32, 2024);

 

    table1.DataSource = dsTable;

}

 

What I have already confirmed

  • Connection string is valid (works for non-parameterized SP).
  • Stored procedure name is correct and exists.
  • Parameter name matches exactly (@Year).
  • Data exists in the database for the specified parameter.
  • Removing the parameter from the SP makes the report return data normally.
  • The same logic reproduces consistently.

Question / Request

Could you please advise whether:

  1. There is a known issue when assigning a SqlDataSource with parameters programmatically?
  2. Parameter names for stored procedures require a specific format (e.g., no @ prefix)?
  3. Additional configuration is needed when binding a stored-procedure data source at runtime?
  4. There are diagnostics or logging steps to help trace how parameters are passed inside Telerik Reporting?

 

Thank you for your assistance.

Todor
Telerik team
 answered on 18 Nov 2025
2 answers
153 views

I have a requirement to produce reports for archival purposes that can consist of 50K-60K rows.  WPF client app code snippet is:


                tblDetail.NeedDataSource += (s, e) =>
                {
                    var t = (Table)s;
                    t.DataSource = visibleRows;
                };

                var reportProcessor = new ReportProcessor();
                RenderingResult? result = reportProcessor.RenderReport("PDF", report, null);
RenderReport performance is abysmal for even a simple report - 11 columns, 1 grand total row (so far), no pagecount (but it will be needed). Can I do anything to dramatically improve performance or should I look for an alternative to Telerik Reporting?
Todor
Telerik team
 answered on 03 Nov 2025
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?