Git Product home page Git Product logo

crm-powerbi-viewer's People

Contributors

snyk-bot avatar taarskog avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

crm-powerbi-viewer's Issues

Question: Keep the report level filter when bookmarks are applied

Hi Trond,

I have 6 bookmarks that hide/show 6 different data tables on a report. The script I was working on would only apply the report level filter to the default table/first table. The report level filter would go away after I clicked on different bookmarks. How could I keep the report level filter when bookmarks are applied?

Samples.Filters.filterOnOwnerName = function (report) {
report.on("loaded", function(event) {

var username = window.parent.Xrm.Page.context.getUserName();
console.log(username);

        const filterUserName = {
            $schema: "http://powerbi.com/product/schema#basic",
            target: {
                table: "filteredpayment",
                column: "Rep"
            },
            operator: "In",
            values: [username]
        };
        report.setFilters([filterUserName]); 

});
}

Thank you!

Sign in errors

Hello,

I performed the following steps:
-Created a PBI dashboard and published to the same tenant that CRM is in.
-Added Power Bi Viewer to Azure AD.
-Installed the managed solution into CRM.
-Created a new solution and edited the config.js script to include my Application ID.
-Published All Customizations.

Environment: CRM v9 (Version 1612 (9.0.1.425) (DB 9.0.1.127) online)
Browsers: Tried Chrome 64.0.3282.167 and Firefox v59.0b8
OS: Win10

When I try to open PowerBIViewer from solutions, it starts to load, then pops to a new screen with the error below.

Request Id: b6cccc92-2d45-4ea3-8113-ac66158b6300
Correlation Id: cdc5d297-3852-4539-aeca-69e48dae809a
Timestamp: 2018-02-20T22:39:50Z
Message: AADSTS50011: The reply address 'https://ma2017.crm.dynamics.com//WebResources/his_/powerbi/admin.html' does not match the reply addresses configured for the application: '01334ecc-d8ef-4737-8d38-946fc31c792f'. More details: not specified

Any suggestions?

image

Add support for localization

Logging and the few pages with content are currently all in English and texts are spread around in the code. Move all texts and add support for localization.

Blank configuration page

Hi Trond
I get a blank configuration page in the solution - in both IE and Chrome.
First it says loading for a few seconds - and then a blank page.
screenhunter 1035
screenhunter 1034
Any suggestions?

Add support for filter

Power BI supports getting a single filter either as an encoded part of the url query

   filter=<table>/<column> eq '<filtervalue>'

or by passing the filter as odata in the postmessage when providing the token

iframe.contentWindow.postMessage(JSON.stringify({
   oDataFilter: "<table>/<column> eq '<filtervalue>'"
   action: "loadReport",
   accessToken: token,
   width: width,
   height: height }), "*");

Add support for static filters on dashboards and dynamics filters from form data (Xrm) when embedding reports into CRM forms.

Filters currently only supported on reports and only a single filter can be set.

Move config info from error page to solution config page or separate page

Showing configuration options on the error page doesn't really make sense and often the iframe is too small to show all the information.

Place it either on a separate dedicated page or as a tab / info-element on the solution configuration page would work better. The error page should then include a link to the configuration page and not much else.

GroupID not set on Click through from Tile

Hello,

We have noticed that when a dashboard tile is used with powerbi viewer, if it belongs to another group workspace, the tile when clicked causes an error in PowerBI. The error is caused by not passing the GroupID as part of the URL.

We have verified by reconstructing the URL with groupID and it then behaves correctly.

thanks for building this tool.

Viewer is blank when opened with Xrm.Utility.openWebResource

Hi @taarskog

I have tried to open the viewer using:

Xrm.Utility.openWebResource("his_/powerbi/viewer.html", customParameters);

customParameters contains all of the parameters obtained from the solution configuration page and passed in the Custom Parameters when embedding in a dashboard or entity form. his_/powerbi/viewer.html is displayed, but is blank.

Is there a reason why this does not work, and is there a way to overcome that reason?

Doesn't render on mobile

We cannot get our viewer to render PowerBI reports when viewed from the mobile application. This is CRM v9, the latest update. Is this supported?

Reporting non CRM data within CRM

Hi,
sorry to ask, but I am new to Power BI. I would like to create reports on non CRM data, and then expose them in CRM by passing a parameter which would link he data.
For example, sales are done in an external system, and rather than importing the data into a CRM entity, the data could be pushed into Power BI to be reported on. Then in CRM I could show sales reports per customer, and per salesperson etc.
Is this possible, and if so is your crm powerbi viewer the approach I should use. In theory it looks like it may be possible to me.

many thanks. sudmanche

Error message on configuration page

Imported the solution (v1.0). Seemed to import fine but configuration page says "An error has occurred. Please try again and finally contact your administrator. More details may be found in the debug console (if appropriate logging level has been set)."

Running Microsoft Dynamics 365 Version 1612 (9.0.2.449) (DB 9.0.2.449) online.
Image of message attached. pbiviewer image 1

Any suggestions appreciated!

Thanks!

Issues configuring

Hi

Sorry if this is not the right place to write this . I like the solutions and trying to use it .I followed all the documentation steps . I first installed v8 but it was not working at all .Then i installed version 7 .First it said the azure reply address in not matching . i then configured a reply address in azure.

Now when i open the configuration page .It opens up but keeps on loading records .But nothing happens. Can you please help me out on how to debug the issue. i got a dynamics 365 online account that i am using at the moment.

image
capture

Handling Mouse Events

In your Enhancements list for Version 0.50, you say "Open related Dynamics 365 records when clicking on data in a report". Do you have an example of how you have implemented this?

Alternatively, do you have an example of handling the tileClicked event, or any similar mouse interaction, please?

Filter error

Hi

I have created a report with data from AX. I use the accountnumber on account in CRM as key to the customer (User ID) in AX.

The script takes accountnumber from the account form and pass it as filter value

window.Samples = window.Samples || {};
Samples.Filters = Samples.Filters || {};

Samples.Filters.filterWarrentyUnit= function () {


    var accnum = window.parent.Xrm.Page.getAttribute("accountnumber").getValue();

    return [
        {
            $schema: "http://powerbi.com/product/schema#basic",
            target: {
                table: "Warrenty Units",
                column: "User ID"
            },
            operator: "Eq",
            values: [accnum]
        }
    ];
}

The report is showing fine, but is not filtered.

image

Do you have any idea why i get this error?

Dashboard with pinned live page

Apparently it does not support dashboard with pinned live page. It just shows a spinning loading wheel when opened. Will it be available in the next release? any tentative release date? Thanks.

Azure AD -> Grant Permissions

This is more of a question than an issues. We have successfully used your solution to embed PowerBI elements into a Microsoft Dynamics form. The problem we are having now is that a Dynamics user can only see the embedded elements if they go into Azure AD and click the Grant Permissions button. Obviously this is not feasible due to a large number of users, so is there a way to grant permissions on behalf of other users?

We did have an Azure Global Admin user go in and click the Grant Permissions button, but that didn't seem to resolve the issue. I understand if this is getting outside of your area of expertise, but wanted to make sure we weren't missing something with the app configuration.

Thanks,
Tim

Report on dashboard not filtering

Describe the bug
I've embedded a report onto a system dashboard and expected to be able to filter the same as it is done on the different forms(accounts, opportunity, etc). However the report is not filtering. Developer tools is no help either because the script is never called. I'm using a treemap visual on the report.

Screenshots

Samples.Filters.filterUser = function (report) {
    debugger;
    report.on("pageChanged", function (event) {
        let page = event.detail.newPage;
        console.log(`Page changed to '${page.displayName}' (${page.name})`);

        if (page.displayName === "Page 1") {
            var user = window.parent.Xrm.Page.context.getUserId();
            user = user.replace('{', '').replace('}', '');
            const filter = {
                $schema: "http://powerbi.com/product/schema#basic",
                target: {
                    table: "Teams",
                    column: "_administratorid_value"
                },
                operator: "In",
                values: [user]
            };

            page.setFilters([filter]);
        }
    });
}`
```

**Environment (please complete the following information):**
 - Online]
 - Chrome
 - D365CE version 9.0.2
 - 1.1
 - Are you able to log directly into [Power BI](https://app.powerbi.com) and see your report/dashboard? Yes

**Additional context**
Debugger does not work, the script is not called. All other filters used on forms work. I've made sure the custom control is added to the web resource on the dashboard. JScript was added to array.

401: Unauthorized-Error:null

I created Azure AD (with all the permissions, manifest update), Configured powerbi/scripts/config.js with correct Application Id. I get 401 Error. Is there anything I am missing

Mobile report visualization

Hi, this is not a proper issue but..
the solution works fine for web visualization; is there any way to enable the resource for tablet too? I'm trying to find out a solution but looks like there are some authentication issue.
Have yout already tried it and can you give me a hint of how to do it?

S

Importing Solution in CRM online V2015

it appears the solutions are for CRM Online 2016. Will this only work in CRM online 2016, or would this plugin also work in CRM 2015? When I try to import into CRM online 2015 I get an error about only being able to import solutions with version 7 or earlier. The current plugin is V8 (ie CRM online 2016).

Last step issue

Hi,

I found the solution of power BI Viewer which seems to be very usefull for me, and I decided to use it. But I have some problems with the installation. I didn't found the solution in other posts so if it's the case, I'm sorry.
I followed all the steps of the configuration document but when I open the solution in the CRM, in the "configuration" window this message appears, and I don't know how to resolve it.
I have got a dynamics 365 online account, and I downloaded the v0.5.0
Thank you!

image

Embedding Reports and sharing

Hello,

I've successfully installed the tool and I can embed Reports for my login. If I use another login, I can't open the report.
Are this solution working with the Power BI Embedded API via Azure?

Thanks a lot!

How to specify predefined credentials for Power BI sign in?

First, thank you for releasing this CRM addon, it is very useful.

My question is: how we can pass the Power BI credentials as parameters to the viewer so that the same credentials always get used to fetch the dashboards into CRM?

Is this even possible?

Thanks

Configuration screen is blank

Describe the bug
Trying to open the configuration page within the solution but the screen is blank

image

To Reproduce
Steps to reproduce the behavior:

  1. Install / Configure the solution
  2. Click on the "configuration" link within the solution
  3. Screen is blank

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots/files to help explain your problem (including screenshot/logfile of console log). For configuration and JavaScript issues please also include his_/powerbi/scripts/config.js

Environment (please complete the following information):

  • D365CE Online
  • Browser Chrome
  • D365CE version [e.g. 9.0.2.2725]
  • crm-powerbi-viewer version [e.g. 1.1.0]
  • Are you able to log directly into Power BI and see your report/dashboard? Yes

Additional context
Add any other context about the problem here.

Group based reports/dashboard result in "This content is not available"

Greetings,

I have been working with this plugin the last few weeks, and at some point any report/dashboard published to a group will not render within CRM (2015 May update). Reports/Dashboards published to the users My Workspace render fine. The user account I test with has the correct licensing (Power Bi Pro, Azure AD premium, CRM Pro).

I have confirmed this on 2 different tenants.

Did something change on the Microsoft side? Any help would be appreciated. I attached a screenshot of what is happening.

issue

PBI on Dynamics CRM Mobile App

Hello - We have this working with the browser, however, when we try it with the Dynamics CRM app, it doesn't render. Is this due to security restrictions within the Mobile app?

Filtering data on initial Load

Hi Trond,
about #34 there is a post about initial load filtering.

Your code:

let filteredSet = false
    report.on('rendered', () => {
        if (filteredSet) return;
        filteredSet = true;
        report.getPages()
        .then(function (pages) {
          // Retrieve active page.
          var activePage = pages.find(function(page) {
            return page.isActive
          });
     
          activePage.setFilters([filter])
            .then(function () {
                console.log("Page filter was set.");
            })
            .catch(function (errors) {
                console.error(errors);
            });
        })
        .catch(function (errors) {
            console.error(errors);
        });
    });

Where have I to insert the code in my JS?
My JS:


window.Samples = window.Samples || {};
Samples.Filters = Samples.Filters || {};

Samples.Filters.filterOnAccount = function (report) {


    report.on("loaded", function (loadedEvent) {
        report.removeFilters(); // For some reason this needs to be done before setting page filters (August 2018)

        report.on("pageChanged", function(event) {
            let page = event.detail.newPage;
            console.log(`Page changed to '${page.displayName}' (${page.name})`);

            {
var accId = window.parent.Xrm.Page.data.entity.getId();
accId = accId.replace('{','').replace('}','');               
const filter = {
                    $schema: "http://powerbi.com/product/schema#basic",
                    target: {
                        table: "accounts",
                        column: "accountid"
                    },
                    operator: "In",
                    values: [accId]
                };

                page.setFilters([filter]);
            }
        });
    });
}

Thanks
Sergio

Question re licensing

As you appear to be using Power BI embedded does this application need a Power BI capacity SKU or, given that you can already embed tiles, is this included in the dynamics 365 license.

Thanks

401 error when opening the powerbi report

Hi,

I used the beta version 1.2 solution and follow the setup guide.
I see my reports in the solution but when I preview them I get no data, only empty frames.

image

Looking at the console (verbose mode), it validates my login via DAL but throws an error on a wabi-uk resource.

image

Any idea's ?

Regards,
Sven Peeters

Unable to specify ReportSection

Is there anyway to be able to specify a specific page emulating the click through from a dashboard tile to report from within native PowerBI with the CRM powerbi viewer solution.

We would see the need in two ways

1)- when we host a PowerBi Report object on CRM dashboard, we may wish to default to specific page.
2) - when clicking on powerbi tile on crm dashboard, or form, it should be able to drill to the correct page within the report

Eg - in PowerBi, the behaviour is to add a URL suffix of /ReportSection1 /ReportSection2 etc to represent the page numbers.

Is there anyway to achieve this - particularly for defaulting a page number on the report component.

thanks

Reports not listed in configuration page after changing D365 URL

The IT department decided to rename the D365 URL for security reason. We experienced issues by just updating the URL in the Azure Active Directory, so, we unregistered and re-registered the app. However, the issue of "No Reports Found" happened again, and this time the reports didn't show up the next day (like last time). We went through the all the installation steps to make sure we didn't miss anything.

Any suggestions?

screenshot

Thanks!

Originally posted by @ForTheLoveOfD365 in #36 (comment)

To the Author

What is your understanding of the licensing requirements for PowerBI using your product within the confines of Dynamics 365? Can they use the free PowerBI or do they need the Professional License of PowerBI for each one of the Users?

New preview workspaces

HI,

When using the new preview workspaces I can see the dashboards/tiles in the configuration but when I go to preview them or use the embed code I get This content isn't available.

The old workspaces work fine but wondered whether this was an issue with power bi API or I need to tweak the embed code for the new workspaces.

Uncaught Get pages is not supported while embedding a visual.

Describe the bug
Attempting to filter a visual after render, and receiving the error:
Uncaught Get pages is not supported while embedding a visual.

The error occurs when trying to make a call to report.GetPages(). Need to do this in order to set the active page and get the active visual.

Sample Code
Here is my sample code. Even if I comment out most of the code, I still get the error.

Samples.Filters.filterOnSurgeonVisual = function (report) {

  const filter = {
                      $schema: "http://powerbi.com/product/schema#basic",
                       target: {
                               table: "Surgeons",
                               column: "SURGEON_ID"},
                       operator: "Eq",
                       values: ["4000047"]
               }
 //alert("test");
 console.log('filterOnSurgeonVisual Start');

 let filteredSet = false;

 report.on("rendered", () => {
         if (filteredSet) return;
         filteredSet = true;
         report.getPages()
              .then(function (pages) {
                   //Retrieve active page
                   //var activePage = pages.find(function (page) {
                   //      return page.isActive
                   //});
                   console.log("filterOnSurgeonVisual Page Name: " + activePage.name);
                   /*
                   activePage.getVisuals()
                    .then(function(visuals) { 
                        // Retrieve the wanted visual
                        var visual = visuals.find(function(visual) {
                            return visual.name = "229533d51970d8bb65cd";
                        });
                        visual.setFilters([filter])
                            .then(function() {
                                console.log("Filter Set");
                            })
                            .catch(function (errors) {
                                console.log(errors);
                            })
                    })
                    .catch(function (errors) {
                        console.log(errors);
                    });
                    */
                })
                .catch(function (errors) {
                    console.log("Error Getting Pages")
                    console.log(errors);
                });
                
    }); // rendered

}

Expected behavior
Not receive the error and be able to filter the visual on my desired column.

Safari not loading the application

Hey,

I got the solution working perfectly on our CRM instance.

However our Mac users are currently unable to use the solution. The PowerBI tiles embedded with viewer.html show up white on dashboards.

I can see the Webresource title and the PowerBI Refresh button, but the content of tiles or reports does not load.

Unable to See Custom Reports

Hi This solution looks to be very promissing.

The documentation of step 1 here (http://crm-powerbi-viewer.heiigjen.com/pages/add-report-to-dashboard.html) shows reports from the Microsoft Dynamics CRM Sales Content Pack. However in the use case I am working on there are using only custom reports (no content packs have been installed), is this scenario supported?

After following the setup instructions here is what the Configuration tab looks like;
attachment1

Here is what the embedded report looks like;
attachment2

and the link from that configuration error;
attachment3

Any help would be appreciated.

Prompts For License

This is a great tool. I thought since it's using Power BI Embed that the users that view it don't need a Power BI Pro license. Is that the case or is something wrong with my configuration?

Maintain Page and Report filter with Advanced Configuration

Hi Trond,

I finally have my Power BI report in Dynamics CRM thanks to your help in Ticket #37.

Now I notice that I have only filter specified in JS "FilterOnAccount" in the Report embedded in CRM.

How Can I maintain report and page filter with JS account filter?

Do I remove this part? = report.on("loaded", function (loadedEvent) { report.removeFilters();

Thanks
Sergio

Data Filtering

I followed the Trond’s guide and I see my Power BI report in Dynamics 365 dashboards and forms 🙂

I have some issues about data filtering: following your guide I created the web resource for Account filtering (new_accountfilter.js); I adding this in his_/powerbi/scripts/config.js:

image

is this correct?

After in the form I modified the web resource properties adding &customFn=Samples.Filters.filterOnAccount
and selected the option to pass the record Id

image

Thanks
Sergio

Trouble Signing In on Power Bi Viewer Solution's Configuration Page

Hi

We are facing this issue of not able to Sign In to Power BI after importing and configuring the solution provided.
As per the Blog, we were able to achieve till the Power BI Sign In Account. The credentials which do have Power BI Rights were not able to get Signed In. Please see the Screenshots.

Can you help providing some insights about what should i ensure to get the solution's feature in place.

image

Cant get filter to work on tile

Hi

I have created a Power BI report and pined some tiles to a dashboard. I can see the dashboad and tiles in the PowerBIViewer configuration (but not any reports). I have copied the tile configuation and created a web resource on the form with the following

type=tile&id=b4b059db-f385-4093-80ef-de4ce52c0bb6&dashboardId=e2b598ce-41d4-4cfd-a9c9-7d4fcc00c71f

image

The tile with data is shown on the form but not filtered, so i add

&filterFn=Samples.Filters.filterOnAccount

image

The filterOnAccount script looks like this

window.Samples = window.Samples || {};
Samples.Filters = Samples.Filters || {};

Samples.Filters.filterOnAccount = function () {

    var accid = window.parent.Xrm.Page.data.entity.getId();
    accid = accid.replace('{','').replace('}','');

    return [
        {
            $schema: "http://powerbi.com/product/schema#basic",
            target: {
                table: "contacts",
                column: "_parentcustomerid_value"
            },
            operator: "Eq",
            values: ["7b8fb6d5-f5e0-e811-a958-000d3aba014b"]
        }
    ];
}

I steped through the function in the debugger, and the script is running and the filter is returned

But the tile on the form is not filtered

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.