Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Menu missing when switching from View to Edit mode

Instead of being displayed in edit mode and hidden in view mode the menu (appBar) is no longer visible when switching an embedded report from view to edit mode with 

report.switchMode("edit")

Embedding the report in Edit mode shows the menu correctly on start but after switching from edit to view mode it turns black and all the file menu is empty.

 

Are there new APIs to control the menu visibility or is this a bug?

 

Status: New
Comments
Anonymous
Not applicable

I have the same problem.

Using the "Extend menu options" interaction after switch to edit mode works for me.

 

const base64Icon = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEwAACxMBAJqcGAAAAu9JREFUeJzt3U9OE2Ech/FnSiKsXbh340pg5Qk8gofAY3gGtBqWXsKNIR5BF0ZkQ9h6A2pC62LAEP5ITdv3R+f7fJJ3QUh4ZzpPmaaZmReGZxf4ABwDE2C24Jhc/K33wE7D/dB/2gIOgCmLH/S7xhQYA5uN9klz2gK+sLoDf30cXsypB+KAdgf/coyb7Jnutctq/+3/63Sw3WD/VmpUvQFL8BroCubtgL2CeXXNMe3f/ZfjqMH+rVTFO2fZJsCjwrnX+sPgEAKYFc+/1q/hED4DaAEGEM4AwhlAOAMIZwDhDCCcAYQzgHAGEM4AwhlAOAMIZwDhDCCcAYQzgHAGEM4AwhlAOAMIZwDhDCCcAYQzgHAGEM4AwhlAOAMIZwDhDCCcAYQzgHAGEM4AwhlAOAMIZwDhDCDcbQEs+3n7qx7Vqvf/vjH3egctnrfvqB13rnfQ+nn7jtrxd72DDXpj4BVK8RR4DHzq6M/5X1nzZ97qv82A3Q3gDfCidltUoAOmHf0nxGfFG6MaPztqn7evWpOO/lygUH4TGM4AwhlAOAMIZwDhDCCcAYQzgHAGEM4AwhlAOAMIZwDhDCCcAYQbAb+rN0JlJiPgtHorVOZkRH+NuDIddvS3C33Dy8LTTLm4LPwX8AQvDU/zDvh4+cMm/amg+pYlR5vxmVuuBN+iv0XMm0OHO86Bfa4c/NvO+9vAHvCS/h6yG3eSaq1MgBP6//AHwPervxzCB79Z8fxr/Rr6TWA4AwhnAOEMIJwBhDOAcAYQzgDCGUA4AwhnAOEMIJwBhDOAcAYQzgDCGUA4AwhnAOEMIJwBhDOAcAYQzgDCGUA4AwhnAOEMIJwBhDOAcAYQzgDCGUA4AwhnAOEMIJwBhDOAcAYQbggBVK53MCmceymGEMBp4dwnhXMvxRACqFzvwLUWHoAdah5wfQ48b7B/msOY9gHsN9kzzaX1ege3Pm9ftVqsd3Djeft6eLbpl0M5As5Y/KCfAT+AtwzwnP8HNwiKJyPkCoYAAAAASUVORK5CYII=";
 
// The new settings that you want to apply to the report.
const newSettings = {
  extensions: [
    {
      command: {
        name: "extension command",
        title: "Extend commands",
        icon: base64Icon,
        extend: {
          // Define visualOptionsMenu to extend options menu
          visualOptionsMenu: {
            // Define title to override default title.
            // You can override default icon as well.
            title: "Extend options menu",
          }
        }
      }
    }
  ]
};

var embedContainer = $('#embedContainer')[0];
report = powerbi.get(embedContainer);

// Update the settings by passing in the new settings you have configured.
report.updateSettings(newSettings);
  

Ref: https://microsoft.github.io/PowerBI-JavaScript/demo/v2-demo/index.html#

1) Embed > ViewMode > Run
2) Interact > Enter edit mode > Run

3) Menu Extensions > Extend options menu > Run

 
Anonymous
Not applicable

I have the same problem. 

 

As a workaround i used report.updateSettings() with the new settings: "Extend option menu" after report = powerbi.embed().

 

...
var reportContainer = document.getElementById('reportContainer');
var report = powerbi.embed(reportContainer, config);

var newSettings = {
  extensions: [{
      command: {
        name: "extension command",
        title: "Extend commands",
        extend: {
          visualOptionsMenu: {
            title: "Extend options menu"}
        }
      }
    }
  ]
};

report.updateSettings(newSettings)
    .catch(function (error) {
        Log.log(errors);
    });

Ref:  https://microsoft.github.io/PowerBI-JavaScript/demo/v2-demo/index.html#
1) Embed > View mode > Run

2) Interact > Edit & Save > Enter edit mode > Run

3) Interact > Menu Extensions > Extend options menu > Run

mohassan99
Helper II

How do I switch from editing view to reading view in power bi desktop without coding.