Telerik Forums
Reporting Forum
2 answers
502 views

I downloaded the samples provided in GitHub and was very surprised and disappointed that there wasn't a single example of using the WPF ReportViewer.

What I'm doing seems trivial, but I'm stuck.  I've created a report in the stand-alone designer and saved it as a local file.  The report connects to SQL server.  I added the report server as per the instructions found at https://docs.telerik.com/reporting/embedding-reports/display-reports-in-applications/wpf-application/how-to-add-report-viewer-to-a-wpf-.net-core-project.  However, when I run the application, I get the following:

I've looked everywhere I can think of and have not found a solution to this simple problem.  Any help would be appreciated.

Thanks!

Bradley
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 11 Sep 2024
1 answer
483 views

I'm upgrading all of the Telerik packages in an application to the latest version. The final piece is to get ahold of the files telerikReportViewer.kendo-18.2.24.806.min.js and telerikReportViewer-18.2.24.806.min.js.

I've tried following the instructions to use the CDN: Using CDN - Download and Installation - Kendo UI for jQuery (telerik.com). I'm not finding these files there. 

I also read this article: HTML5 Report Viewer Requirements and Browser Support - Telerik Reporting. It states that these files are served by default from the Telerik Reporting REST Service, but I'm having a hard time understanding the process of actually getting them. 

It seems that, for the previous version, we had local copies of these files in our project. I'm not sure where we got them from. Can anyone provide instructions on where to find these files? 

Lance | Senior Manager - Technical Support
Telerik team
 answered on 10 Sep 2024
1 answer
174 views


Keep having this error. Nuget package on both projects is the latest '18.2.24.806'. Based on what I've read I need to update my links/scripts in my index.html probably, but I cannot find the correct combinations. 

The projects are a Blazor WASM .net 8 project and a .net8 minimal api (though I used a controller to get the reporting service running correctly). 

Here is my index.html

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Production Scheduler</title>
    <base href="/" />

    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.js"></script>
    <script src="https://demos.telerik.com/report-server/api/reports/resources/js/telerikReportViewer"></script>
    
    <link href="ProductionScheduler.Web.styles.css" rel="stylesheet" />
    <link rel="stylesheet" href="css/bootstrap/bootstrap.min.css" />
    <link rel="stylesheet" href="css/app.css" />
    <link rel="stylesheet" href="css/telerik/navigation-drawer.css" />
    <link rel="stylesheet" href="css/telerik/all.css" />
    <link rel="stylesheet" href="css/telerik/listview.css" />
    <link rel="stylesheet" href="css/telerik/custom-styles.css" />
    <link rel="stylesheet" href="css/telerik/telerik-button.css" />
    <link rel="stylesheet" href="css/telerik/grid-command-button.css" />
    <link rel="stylesheet" href="_content/Telerik.UI.for.Blazor/css/kendo-theme-default/all.css" />
    <link rel="stylesheet" href="https://kendo.cdn.telerik.com/2022.3.913/styles/kendo.default-main.min.css" />
    <script src="_content/Telerik.UI.for.Blazor/js/telerik-blazor.js" ></script>
</head>

<body>
    <div id="app" class="fit-screen">
        <svg class="loading-progress">
            <circle r="40%" cx="50%" cy="50%" />
            <circle r="40%" cx="50%" cy="50%" />
        </svg>
        <div class="loading-progress-text"></div>
    </div>

    <div id="blazor-error-ui">
        An unhandled error has occurred.
        <a href="" class="reload">Reload</a>
        <a class="dismiss">🗙</a>
    </div>
	<script src="_framework/blazor.webassembly.js"></script>
	<script>
	    window.blazorCulture = {
	        get: () => window.localStorage['BlazorCulture'],
	        set: (value) => window.localStorage['BlazorCulture'] = value
	    };
	</script>
    <script src="_content/Telerik.ReportViewer.Blazor/interop.js" defer></script>
</body>

</html>

I also am receiving this error in my dev console, but am not sure if it is related or not.


Any help is appreciated!

Ivet
Telerik team
 answered on 10 Sep 2024
1 answer
199 views

Hello,

Since my previous post, we've been evaluating the functionalities of the designer.

One of our main requirement is to display data as crosstabs.

We intend to use a WebServiceDataSource to fetch the data as JSON so that the report will only have to display them, without having to make any calculations or containing business rules.

I've included the JSON sample that I'm using below. As you can see, we have a school, which contains classes, which contains a list of students and a list of subjects. Each student has evaluations : a grade in one of the subject of the class. Each subject has a display order and a grade average of the class.

Each report page must display one class with a crosstab. The crosstab must display the grades of each students for each subjects.

Now, I struggle to show the following information (in yellow in the screenshot below) : 

  • The room number of the class should be located in the header, but I can't get to it from the header since the class is part of the list and not the header.
  • The subjects should be on the Y-axis with :
    • The subject label on the crosstable header, ordered by it's display order
    • For each student line, the grade corresponding to the subject should be displayed
    • For each subject, the average class (from the JSON) should be displayed at the bottom of the crossbar

Some information :

  • For the purpose of this report, I've used a JSON inline datasource.
    • I succeeded to show the grade for each student by flattening the data into rows of student-subject-grade inside the class and grouping inside the crosstab. But this solution doesn't suits us because it duplicates data for each student (name, surname,..) and each subject.
  • Though, I still couldn't show the class average from the JSON for each subject.
  • We don't want to use a subreport.

I'd be glad if you could advise me on the best way to solve those issues.

Also, I've two additional questions : 

  1. In a crosstab cell which contains a textbox, is it possible, under some conditions (Conditional formatting ?), to show something else instead of the textbox ? For example, sometimes a student doesn't take a subject. In this case, for this student, we'd like to include a diagonal lines through the whole cell.
    1. The Data Explorer doesn't show the drilled information such as the students values and their evaluations. Since those are a great help at design time, isn't there a way to display those ?

    Thanks a lot for your help and I can provide more information if needed or if something is unclear.

    Here's the JSON which is the main Datasource. Also, I'm attaching the .trdx (in the .zip) to this post.

    {
      "schoolName": "Muggle School",
      "schoolImage": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNk+A8AAQUBAScY42YAAAAASUVORK5CYII=",
      "classes": [
        {
          "name": "East123",
    	  "roomNumber": 10,
          "studentAmount": 3,
          "students": [
    		{
    		  "id": 12345,
    		  "name": "Snow",
    		  "surname": "John",
    		  "evaluations": [
    		    {
    			  "subjectCode": "ENGL",
    			  "grade": 6
    			},
    			{
    			  "subjectCode": "FREN",
    			  "grade": 3
    			},
    			{
    			  "subjectCode": "MATH",
    			  "grade": 5.5
    			}
    		  ]
    		},
    		{
    		  "id": 12346,
    		  "name": "Potter",
    		  "surname": "Harry",
    		  "evaluations": [
    		    {
    			  "subjectCode": "ENGL",
    			  "grade": 4
    			},
    			{
    			  "subjectCode": "FREN",
    			  "grade": 4.5
    			},
    			{
    			  "subjectCode": "MATH",
    			  "grade": 4.5
    			}
    		  ]
    		},
    		{
    		  "id": 12347,
    		  "name": "Parker",
    		  "surname": "Peter",
    		  "evaluations": [
    		    {
    			  "subjectCode": "ENGL",
    			  "grade": 5
    			},
    			{
    			  "subjectCode": "FREN",
    			  "grade": 5.5
    			},
    			{
    			  "subjectCode": "MATH",
    			  "grade": 6
    			}
    		  ]
    		}
    	  ],
    	  "subjects": [
    	    {
    		  "code": "ENGL",
    		  "label": "English",
    		  "displayOrder": 2,
    		  "classAverage": 5
    		},
    		{
    		  "code": "FREN",
    		  "label": "French",
    		  "displayOrder": 3,
    		  "classAverage": 4.5
    		},
    		{
    		  "code": "MATH",
    		  "label": "Mathematics",
    		  "displayOrder": 1,
    		  "classAverage": 5.5
    		}
    	  ]
        },
    	{
          "name": "South123",
    	  "roomNumber": 20,
          "studentAmount": 3,
          "students": [
    		{
    		  "id": 12348,
    		  "name": "Sparrow",
    		  "surname": "Jack",
    		  "evaluations": [
    		    {
    			  "subjectCode": "ENGL",
    			  "grade": 6
    			},
    			{
    			  "subjectCode": "FREN",
    			  "grade": 3
    			},
    			{
    			  "subjectCode": "MATH",
    			  "grade": 5.5
    			}
    		  ]
    		},
    		{
    		  "id": 12349,
    		  "name": "Black",
    		  "surname": "Sirius",
    		  "evaluations": [
    		    {
    			  "subjectCode": "ENGL",
    			  "grade": 4
    			},
    			{
    			  "subjectCode": "FREN",
    			  "grade": 4.5
    			},
    			{
    			  "subjectCode": "MATH",
    			  "grade": 4.5
    			}
    		  ]
    		},
    		{
    		  "id": 12350,
    		  "name": "Baggins",
    		  "surname": "Frodo",
    		  "evaluations": [
    		    {
    			  "subjectCode": "ENGL",
    			  "grade": 5
    			},
    			{
    			  "subjectCode": "FREN",
    			  "grade": 5.5
    			},
    			{
    			  "subjectCode": "MATH",
    			  "grade": 6
    			}
    		  ]
    		}
    	  ],
    	  "subjects": [
    	    {
    		  "code": "ENGL",
    		  "label": "English",
    		  "displayOrder": 2,
    		  "classAverage": 5
    		},
    		{
    		  "code": "FREN",
    		  "label": "French",
    		  "displayOrder": 3,
    		  "classAverage": 4.5
    		},
    		{
    		  "code": "MATH",
    		  "label": "Mathematics",
    		  "displayOrder": 1,
    		  "classAverage": 5.5
    		}
    	  ]
        }
      ]
    }
    1 answer
    272 views

    I'm trying to use Telerik.Reporting 14.1.20.618 in a NET 8 AWS Lambda. The lambda project makes reference to another class library where there's also a reference to Telerik.Reporting, but whenever I try to generate a report, I keep getting the following error message:

    Could not load file or assembly 'Telerik.Reporting, Version=14.1.20.618, Culture=neutral, PublicKeyToken=a9d7983dfcc261be'. An operation is not legal in the current state. (0x80131509)



    Resolved assembly's simple name should be the same as of the requested assembly.
       at System.Runtime.Loader.AssemblyLoadContext.ValidateAssemblyNameWithSimpleName(Assembly assembly, String requestedSimpleName)
       at System.Runtime.Loader.AssemblyLoadContext.ResolveUsingEvent(AssemblyName assemblyName)
       at System.Runtime.Loader.AssemblyLoadContext.ResolveUsingResolvingEvent(IntPtr gchManagedAssemblyLoadContext, AssemblyName assemblyName)



    I assume it shouldn't be a compatibility issue since that Telerik version supports standard 2.0
    Dimitar
    Telerik team
     answered on 06 Sep 2024
    1 answer
    103 views

    I have a report having 28 column to display with 13000 records with grouping applied on 3 fields which comes in 890 pages it takes around 2 mins to render.How to improve the performance of the report?

    I am binding List<Generic Type> as report data source.

    Dimitar
    Telerik team
     answered on 06 Sep 2024
    1 answer
    129 views
    1 answer
    170 views

    Hello Telerik,

    I am following the Telerik Virtual Classroom course for Telerik Reporting.  At the end of the Hosting an API Endpoint section the teacher runs the app and sees the Report Viewer Container.   When I launch the app (without errors) I do not see this report container on the Reports.razor page.

    Thank you for your assistance.

    @page "/report"
    @using Telerik.ReportViewer.Blazor

    <style>
        .trv-report-viewer {
            width: 100%;
            height: 880px;
        }
    </style>
    Testing Outside of Div
    <div class="dashboard">
        Testing inside of Div
        <ReportViewer ViewerId="rv1"
                      ServiceUrl="api/reports"
                      ReportSource="@(new ReportSourceOptions
                                      {
                                          Report = "rps_dashboard_report.trdp"
                                      })"
                      />

    </div>


    <link href="css/dashboard.css" rel="stylesheet" />

    @code {

    }

    Dess | Tech Support Engineer, Principal
    Telerik team
     answered on 28 Aug 2024
    2 answers
    252 views

    I'm using Q32024 (Trial) in a Blazor Server App, added after initial project creation (existing app, not using the "create Telerik app" wizard)

    I have a VERY simple page with just a native report viewer (added via Add new Blazor Component -> Telerik Native Report Viewer Page) pointed to the SampleReport generated when adding this page.

    When rendering the page, the report takes over 10s to show. (I'm able to provide a video of this). Any other report has the same issue, both with and without parameters. Subsequent loads are a little bit quicker, but still C5s

    Looking in Output, it looks like it's attempting to repeatedly render the report - I have the following block repeated several times (Snipped for brevity, more available);

    icrosoft.AspNetCore.Components.Server.Circuits.RemoteRenderer: Debug: Completing batch 32 without error in 32.2212ms.
    Microsoft.AspNetCore.Components.RenderTree.Renderer: Debug: Rendering component 154 of type Telerik.Blazor.Components.ToolBar.ToolBarToolsFactory
    Microsoft.AspNetCore.Components.RenderTree.Renderer: Debug: Rendering component 155 of type Telerik.Blazor.Components.ToolBar.ToolBarToolsFactory
    Microsoft.AspNetCore.Components.RenderTree.Renderer: Debug: Rendering component 156 of type Telerik.Blazor.Components.ToolBar.ToolBarToolsFactory
    Microsoft.AspNetCore.Components.RenderTree.Renderer: Debug: Rendering component 157 of type Telerik.Blazor.Components.ToolBar.ToolBarToolsFactory
    Microsoft.AspNetCore.SignalR.Internal.DefaultHubDispatcher: Trace: InvocationId (null): Sending result of type 'System.Void'.
    Microsoft.AspNetCore.Components.RenderTree.Renderer: Debug: Rendering component 158 of type Telerik.Blazor.Components.ToolBar.ToolBarToolsFactory
    Microsoft.AspNetCore.Components.RenderTree.Renderer: Debug: Rendering component 159 of type Telerik.Blazor.Components.ToolBar.ToolBarToolsFactory
    Microsoft.AspNetCore.Components.RenderTree.Renderer: Debug: Rendering component 160 of type Telerik.Blazor.Components.ToolBar.ToolBarToolsFactory
    Microsoft.AspNetCore.Components.RenderTree.Renderer: Debug: Rendering component 161 of type Telerik.Blazor.Components.ToolBar.ToolBarToolsFactory
    Microsoft.AspNetCore.Components.RenderTree.Renderer: Debug: Rendering component 162 of type Telerik.Blazor.Components.ToolBar.ToolBarToolsFactory
    Microsoft.AspNetCore.Components.RenderTree.Renderer: Debug: Rendering component 163 of type Telerik.Blazor.Components.ToolBar.ToolBarToolsFactory
    Microsoft.AspNetCore.Components.RenderTree.Renderer: Debug: Rendering component 164 of type Telerik.Blazor.Components.ToolBar.ToolBarToolsFactory
    Microsoft.AspNetCore.Components.RenderTree.Renderer: Debug: Rendering component 165 of type Telerik.Blazor.Components.ToolBar.ToolBarToolsFactory
    Microsoft.AspNetCore.Components.RenderTree.Renderer: Debug: Rendering component 166 of type Telerik.Blazor.Components.ToolBar.ToolBarToolsFactory
    Microsoft.AspNetCore.Components.RenderTree.Renderer: Debug: Rendering component 167 of type Telerik.Blazor.Components.ToolBar.ToolBarToolsFactory
    Microsoft.AspNetCore.Components.RenderTree.Renderer: Debug: Rendering component 168 of type Telerik.Blazor.Components.ToolBar.ToolBarToolsFactory
    Microsoft.AspNetCore.Components.RenderTree.Renderer: Debug: Rendering component 169 of type Telerik.Blazor.Components.ToolBar.ToolBarToolsFactory
    Microsoft.AspNetCore.Components.RenderTree.Renderer: Debug: Rendering component 170 of type Telerik.Blazor.Components.ToolBar.ToolBarToolsFactory
    Microsoft.AspNetCore.Components.RenderTree.Renderer: Debug: Rendering component 171 of type Telerik.Blazor.Components.ToolBar.ToolBarToolsFactory
    Microsoft.AspNetCore.Components.RenderTree.Renderer: Debug: Rendering component 118 of type Telerik.Blazor.Components.Common.Popup
    Microsoft.AspNetCore.Components.RenderTree.Renderer: Debug: Rendering component 126 of type Telerik.Blazor.Components.ToolBarButton
    Microsoft.AspNetCore.Components.RenderTree.Renderer: Debug: Rendering component 127 of type Telerik.Blazor.Components.ToolBarButton
    Microsoft.AspNetCore.Components.RenderTree.Renderer: Debug: Rendering component 128 of type Telerik.Blazor.Components.ToolBarButton
    Microsoft.AspNetCore.Components.RenderTree.Renderer: Debug: Rendering component 129 of type Telerik.Blazor.Components.ToolBarButton
    Microsoft.AspNetCore.Components.RenderTree.Renderer: Debug: Rendering component 130 of type Telerik.Blazor.Components.ToolBarButton
    Microsoft.AspNetCore.Components.RenderTree.Renderer: Debug: Rendering component 131 of type Telerik.Blazor.Components.ToolBarButton
    Microsoft.AspNetCore.Components.RenderTree.Renderer: Debug: Rendering component 132 of type Telerik.Blazor.Components.ToolBarTemplateItem
    Microsoft.AspNetCore.Components.RenderTree.Renderer: Debug: Rendering component 133 of type Telerik.Blazor.Components.ToolBarButton
    Microsoft.AspNetCore.Components.RenderTree.Renderer: Debug: Rendering component 134 of type Telerik.Blazor.Components.ToolBarButton
    Microsoft.AspNetCore.Components.RenderTree.Renderer: Debug: Rendering component 135 of type Telerik.Blazor.Components.ToolBarToggleButton
    Microsoft.AspNetCore.Components.RenderTree.Renderer: Debug: Rendering component 136 of type Telerik.Blazor.Components.ToolBarButton
    Microsoft.AspNetCore.Components.RenderTree.Renderer: Debug: Rendering component 137 of type Telerik.Blazor.Components.ToolBarButton
    Microsoft.AspNetCore.Components.RenderTree.Renderer: Debug: Rendering component 138 of type Telerik.Blazor.Components.ToolBarButton
    Microsoft.AspNetCore.Components.RenderTree.Renderer: Debug: Rendering component 139 of type Telerik.Blazor.Components.ToolBarToggleButton
    Microsoft.AspNetCore.Components.RenderTree.Renderer: Debug: Rendering component 140 of type Telerik.Blazor.Components.ToolBarToggleButton
    Microsoft.AspNetCore.Components.RenderTree.Renderer: Debug: Rendering component 141 of type Telerik.Blazor.Components.ToolBarButton
    Microsoft.AspNetCore.Components.RenderTree.Renderer: Debug: Rendering component 142 of type Telerik.Blazor.Components.ToolBarButton
    Microsoft.AspNetCore.Components.RenderTree.Renderer: Debug: Rendering component 143 of type Telerik.Blazor.Components.ToolBarToggleButton
    Microsoft.AspNetCore.Components.RenderTree.Renderer: Debug: Rendering component 144 of type Telerik.Blazor.Components.ToolBarToggleButton

    Anyone have any ideas as to why it's doing this or why it's SO slow - as it stands it's unacceptable for me to use, but I'm happy for someone to point out where I may have gone wrong / something I may have missed....

    <EDIT>

    Looking at the code that's been added by the add item wizard, it's correctly (?) added the TelerikRootComponent to my main layout page, but I also needed to wrap the whole Viewer in ANOTHER root component otherwise I'm seeing an error that no root component is present.

    Also, and not sure if this is significant, the Sample Report actually states that

    "This is a sample report to demonstrate a working HTML5 Report Viewer and REST Reporting Service with XML report definition (trdx). The report definition is created with the Standalone Report Designer" - I understand that the Blazor native viewer is built on top of the HTML5 viewer, but this seemed odd (doubly since it wasn't actually created by the standalone designer but I guess that's the "original" source of the report!

    I've also noticed that despite the fact I've set @bind-ParametersAreaVisble to a false value, it still shows (sample report has a date param), even though I'm specifying the parameter;

    public ReportSourceOptions ReportSource { get; set; } = new ReportSourceOptions { Report = "sampleReport.trdp", Parameters = new Dictionary<string, object> 
    { 
        {"Date", DateTime.Today}
    }};

    I've also tried passing as a simple string in the format "12/08/2024" - interestingly, in both cases, the value I specify for the parameter is actually shown in the parameter editor

    </EDIT>

    Richard
    Top achievements
    Rank 1
    Iron
    Iron
    Iron
     answered on 28 Aug 2024
    1 answer
    171 views
    how to sum a column of a table and show the result in a separate text box?
    Ivet
    Telerik team
     answered on 26 Aug 2024
    Top users last month
    Tien
    Top achievements
    Rank 1
    Iron
    Krasimir
    Top achievements
    Rank 3
    Bronze
    Iron
    Iron
    Cedar
    Top achievements
    Rank 1
    Iron
    Emil
    Top achievements
    Rank 1
    Iron
    Kyle Watson
    Top achievements
    Rank 1
    Iron
    Want to show your ninja superpower to fellow developers?
    Want to show your ninja superpower to fellow developers?