Unable to hide preview button in report designer

Posted by: venkatesan_rajendran on 13 February 2026, 6:31 am EST

  • Posted 13 February 2026, 6:31 am EST

    Hi, I need to hide preview button and hence setting the canPreview property to false and it is not working as expected. Am using the latest package @mescius/activereportsnet-designer 19.2.0. Please find the below code snippet.

    arWebDesigner.create('#ar-web-designer', {
      server: {
        url: this.getServerUrl()
      },
      rpx: { enabled: true },
      appBar: { openButton: { visible: true } },
      data: { dataSets: { visible: true, canModify: true }, dataSources: { canModify: true } },
      preview: {
        canPreview: false,
        openViewer: (info) => console.log(info.applicationTitle)
      }
    });

  • Posted 16 February 2026, 2:19 am EST

    Hi Venkatesan,

    To prevent the preview button from showing, you’ll need to comment or remove the ‘preview: {}’ property, as the ‘canPreview’ property is limited to the Blazor Viewer.

    So your code should look like:

    arWebDesigner.create('#ar-web-designer', {
      server: {
        url: this.getServerUrl()
      },
      rpx: { enabled: true },
      appBar: { openButton: { visible: true } },
      data: { dataSets: { visible: true, canModify: true }, dataSources: { canModify: true } },
      //preview: {
      //  canPreview: false,
      //  openViewer: (info) => console.log(info.applicationTitle)
      //}
    });
    

    Regards,

    Anand

  • Posted 16 February 2026, 3:01 am EST

    Hi Anand,

    The preview property is a mandatory property and if I remove it is throwing typescript compilation error.

  • Posted 16 February 2026, 6:39 am EST

    Hi Venkatesan,

    Could you please let us know which technology you are using with the WebDesigner? If possible, please try sharing a runnable sample of your application so we can test the same on our end.

    We tried it with MVC, and commenting the ‘preview’ property seems to work as expected.

    Please find attached our sample for your reference.

    Regards,

    Anand

    WebDesigner_MVC.zip

  • Posted 16 February 2026, 7:19 am EST

    Hi Anand,

    We are using Angular with Typescript. Please find the attached sample to replicate the issue. WebDesigner_Angular_Core.zip.

    This sample is taken from the active reports web samples repository.

    For now, I will suppress the typescript error and proceed but this needs to be fixed to allow preview as a optional property.

    Thanks.

  • Posted 17 February 2026, 1:28 am EST

    Hi Venkatesan,

    We could observe that in ActiveReports 19, TypeScript gives an error for not specifying the ‘preview’ and ‘openViewer’ properties, but ActiveReports 18 gives no errors. Also noticed that the ‘canPreview’ property is not working with Angular.

    We have passed this to our development team with Tracking ID: AR-37051.

    Regards,

    Anand

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels