Telerik Reporting PersistSession default value upgrading from 18.0.24.305 to 18.1.24.514

1 Answer 55 Views
Report Parameters Report Viewer - HTML5 WebForms
Thomas
Top achievements
Rank 1
Thomas asked on 20 Jun 2024, 03:49 PM | edited on 26 Jun 2024, 04:32 PM

Edit: 6/26/2024 11AM

My apologies, I should have been more specific and added some context through code snippets.

We use this version the HTML5 ASP.NET Web Forms Report Viewer

https://docs.telerik.com/reporting/embedding-reports/display-reports-in-applications/web-application/html5-asp.net-web-forms-report-viewer/overview

Also we initialized it like so

                <telerikReporting:ReportViewer ID="rvStandard" Visible="false"
                    Height="750px" ParametersAreaVisible="false" EnableViewState="false" runat="server">
                    <ClientEvents RenderingBegin="rvStandard_RenderingBegin" Error="Report_ClientError" />
                </telerikReporting:ReportViewer>

This resulted in the unusual behavior with newest version 18.1.24.514.

Moving the initialization to like this with PersistSession set to false resolved the weird issue even though we hadn't set PersistSession at all.

                <telerikReporting:ReportViewer ID="rvStandard" PersistSession="false" Visible="false"
                    Height="750px" ParametersAreaVisible="false" EnableViewState="false" runat="server">
                    <ClientEvents RenderingBegin="rvStandard_RenderingBegin" Error="Report_ClientError" />
                </telerikReporting:ReportViewer>

To set the report to be viewed we do that in the code behind of the .aspx page. This occurs after the user has clicked a desired report. This click of what report they desire to view triggers a PostBack to the aspx page which then runs this code below to do some final configuring on the ReportSource.

rvStandard.Visible = true;
rvStandard.AuthenticationToken = IWT.Sped.Encryption.WebApiEncryption.EncryptTextAsBase64( Cast.ToString( SessionManager.CurrentUser.ID ) );
ReportSource rptSource = new ReportSource( );
rptSource.IdentifierType = IdentifierType.TypeReportSource;
var reportSourceParams = new Telerik.ReportViewer.Html5.WebForms.Parameter[]
{ /* your report params here*/};
rptSource.Identifier = "IWT.Sped.Reporting.rptCaseLoadDetail, Reporting, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null";
rptSource.Parameters.AddRange( reportSourceParams );
rvStandard.ReportSource = rptSource;


Hello there,

We have been using Telerik Reporting successfully for many years and have never had a single issue upgrading to the newest version until upgrading to 18.1.24.514.

We were getting the behavior of our ReportViewer getting locked/stuck to the first report being ran. We programmatically set the report in the code behind of our .aspx pages and trigger the ReportViewer to update with the new report and parameters.

After some head banging against the wall, we resolved the issue by setting the PersistSession setting on the ReportViewer to false. To be clear we did not have the PersistSession set to true, it was not configured at all. What is confusing is according to the documentation this value is set to false by default.

https://docs.telerik.com/reporting/embedding-reports/display-reports-in-applications/web-application/html5-report-viewer/api-reference/report-viewer-initialization

Could you please update the documentation or double check that PersistSession is not set to true in the newest version of Telerik Reporting 18.1.24.514 ?

 

1 Answer, 1 is accepted

Sort by
0
Todor
Telerik team
answered on 25 Jun 2024, 11:09 AM

Hi Thomas,

Thank you for raising the issue.

Here is the code of the HTML5 Report Viewer JavaScript that sets the default options:

function getDefaultOptions(serviceUrl, version) {
  return {
    id: null,
    serviceUrl: null,
    templateUrl: rTrim(serviceUrl, "\\/") + "/resources/templates/telerikReportViewerTemplate-" + version + ".html/",
    reportSource: null,
    reportServer: null,
    authenticationToken: null,
    sendEmail: null,
    scale: 1,
    scaleMode: ScaleModes.FIT_PAGE,
    viewMode: ViewModes.INTERACTIVE,
    pageMode: PageModes.CONTINUOUS_SCROLL,
    parametersAreaPosition: ParametersAreaPositions.RIGHT,
    documentMapAreaPosition: DocumentMapAreaPositions.LEFT,
    parameters: {
      editors: {
        multiSelect: ParameterEditorTypes.LIST_VIEW,
        singleSelect: ParameterEditorTypes.LIST_VIEW
      }
    },
    persistSession: false,
    parameterEditors: [],
    disabledButtonClass: null,
    checkedButtonClass: null,
    parametersAreaVisible: true,
    documentMapVisible: true,
    enableAccessibility: false,
    searchMetadataOnDemand: false,
    initialPageAreaImageUrl: null,
    keepClientAlive: true
  };
}

You may find the file 'telerikReportViewer-18.1.24.514.js' in the installation folder of the product, by default 'C:\Program Files\Progress (x86)\Telerik Reporting 2024 Q2\Html5\ReportViewer\js'. We haven't modified the above code as it would be a breaking change.

I am not sure how to explain the observed change in the behavior of the viewer. You may consider opening a support ticket and sending a sample runnable application demonstrating the problem for local investigation.

Regards,
Todor
Progress Telerik

Stay tuned by visiting our roadmap and feedback portal pages, enjoy a smooth take-off with our Getting Started resources, or visit the free self-paced technical training at https://learn.telerik.com/.
Thomas
Top achievements
Rank 1
commented on 26 Jun 2024, 04:35 PM

Thank you for the response Todor, I have updated my original question with some code snippets. I guess the main problem is just that we encountered unusual unexpected behavior and didn't understand why. Resolving it was painful as we were unaware of the PersistSession config setting. It all just seems odd.
Tags
Report Parameters Report Viewer - HTML5 WebForms
Asked by
Thomas
Top achievements
Rank 1
Answers by
Todor
Telerik team
Share this question
or