Open a report using LWC navigation in a new tab


<div class="slds-truncate">

   <a onclick={navigateToReport} data-id="Active"> The Report </a>

</div>



navigateToReport(event) {

    event.stopPropagation();


    this[NavigationMixin.GenerateUrl]({

        type: 'standard__recordPage',

        attributes: {

            recordId: this.settings.theReportID,

            objectApiName: 'Report',

            actionName: 'view'

        },

        state: { 

            fv0: this.account.data.fields.Id.value,

            fv1: event.target.dataset.id

        } 

    }).then(url => { window.open(url) });

}

Comments