Cache issues in Telerik reporting on MAUI Blazor

0 Answers 63 Views
.NET Core Rendering Report Viewer - Blazor
Buddhi
Top achievements
Rank 1
Buddhi asked on 05 Jun 2023, 08:35 AM
I have created Blazor(.Net7) MAUI Windows application and used Telerik Reporting for Reports.


@if (SourceOptions != null)
            {
                <ReportViewer ViewerId="ReportView"
                          ServiceUrl="@ReportSetting.ReportRestServicePath"
                          ReportSource="@SourceOptions"
                          Parameters="@(new ParametersOptions { Editors = new EditorsOptions { MultiSelect = EditorType.ComboBox, SingleSelect = EditorType.ComboBox } })"
                          ScaleMode="@(ScaleMode.Specific)"
                          @ref="__refReportViewer"
                          ParametersAreaVisible=false
                          Scale="1.0" />
            }
    @code{
        [Parameter] public TerlrikReportOptions ReportSetting { get; set; }

        [Parameter] public EventCallback CloseReportDelegate { get; set; }

        private ReportSourceOptions SourceOptions;

        private ReportViewer __refReportViewer;

        public BLReportViewer()
        {
        }

        protected override Task OnParametersSetAsync()
        {
            SourceOptions = new ReportSourceOptions();
            SourceOptions.Report = ReportSetting.ReportName;
            SourceOptions.Parameters = ReportSetting.ReportParameters;
            return base.OnParametersSetAsync();
        }
}

I am using this as a separate razor component by passing some parameters from the parent razor file. but quite often the reports that we are showing on this Telerik report viewer have some issues. time to time report data are not showing, a blank page only can be seen. sometimes header and footer of the page are only showing but the content has been missed. Even if the report doesn't have any issues, some report-building errors are shown by the red color text box.

once I get this issue, always I have to close the application and open it again and reload the report. after that, any issues are not there and all are working fine. most of the time we are getting this issue when we publish a new version of the app and install it for the very first time. From my point of view, I think it should be a cache issue.

I tried to find some solution for this. but I couldn't find it, please help me to resolve it.
Dimitar
Telerik team
commented on 08 Jun 2023, 07:27 AM

Thank you for the provided information!

Without seeing the error messages, it would be hard to confirm that it is a cache-related problem but at the very least, if you are currently using the FileStorage implementation for the storage of the services, you may test replacing it with a storage better suited for production, please see IStorage implementation suitable for deploying both on single instance application hosting and in Web Farms for more details.

Another possible problem could be the SourceOptions object not having the correct values, either the event firing too late or simply the wrong values being passed to it. I suggest making your report parameters visible and checking whether they have the expected values when the errors appear or when there is no data.

Apart from that, I would need to see logs before making any other suggestions so if you would need further assistance, please generate and send the following logs:

I hope that the provided suggestions will help resolve or at least discover the root of the issue, let me know how it goes.

No answers yet. Maybe you can help?

Tags
.NET Core Rendering Report Viewer - Blazor
Asked by
Buddhi
Top achievements
Rank 1
Share this question
or