User Profile
sami_romdhana
New Member
Joined 1 year ago
User Widgets
Contributions
Re: Power BI Embed - Getting filters of particular visual is impossible
Hello, #1 is roughly the workaround we had to use on our side before posting (not #3 as we handle client data, so we can't recreate something we can't read). I can't accept this as a solution since we would need Microsoft to actually fix the underlying code: data is still missing.1.7KViews0likes0CommentsPower BI Embed - Getting filters of particular visual is impossible
Hello. We have an utility that gets all the filter information of every visual using the standard #getFilters method. For some reason, we can't get the filters of one visual. The filters applied to this visual have empty values (one advanced filter, one Top N filter) which hasn't been a problem on other visuals. No filter displays the warning icon that a filter is invalid. When trying to track down the problem, we could reproduce it using the playground and this snippet of code: try { const pages = await report.getPages(); const page = pages.find(page => page.isActive); const visuals = await page.getVisuals(); const visual = visuals.find(visual => visual.name === "<visual ID>"); console.log(await visual.getFilters()); } catch (errors) { console.log("Error", errors); } However, the error is just undefined. When trying to debug further into Microsoft's code, it seems that there is an actual error but that it is mishandled, here is the stack: { "message": "Invoked filter serialization function with no filter.", "stack": "Error: Invoked filter serialization function with no filter. at De.ensureError (https://content.powerapps.com/resource/powerbiwfe/scripts/reportEmbed.min.b01b01905167f493a762.js:1:1458833) at De.throwException (https://content.powerapps.com/resource/powerbiwfe/scripts/reportEmbed.min.b01b01905167f493a762.js:1:1460336) at i.serializeFilter (https://content.powerapps.com/resource/powerbiwfe/scripts/reportEmbed.json-contracts.min.4dbb3fc597b1e8406319.js:1:7900) at I.fromSemanticFilter (https://content.powerapps.com/resource/powerbiwfe/scripts/reportEmbed.json-contracts.min.4dbb3fc597b1e8406319.js:1:6862) at https://content.powerapps.com/resource/powerbiwfe/scripts/reportEmbed.json-contracts.min.4dbb3fc597b1e8406319.js:1:29982 at Array.map (<anonymous>) at u.tryGetFilters (https://content.powerapps.com/resource/powerbiwfe/scripts/reportEmbed.json-contracts.min.4dbb3fc597b1e8406319.js:1:29970) at https://content.powerapps.com/resource/powerbiwfe/scripts/reportEmbed.filter.min.902d70a4ede44353ca9e.js:1:2916 at Generator.next (<anonymous>) at n (https://content.powerapps.com/resource/powerbiwfe/scripts/reportEmbed.vendors.min.b4e0d0f6f68362882eed.js:1:789804)" } And this ends up being unused as the #getFilters method tries to get a body even when it isn't set, as can be seen here: https://github.com/microsoft/PowerBI-JavaScript/blob/master/src/visualDescriptor.ts#L108 So it seems that: * There is a particular problem when serializing some filters * When that happens we can't get an accurate error Is there any possibility of at least seeing issue #1 fixed? We can provide a sample using email if necessary (sample has private data). ThanksSolved2KViews0likes8CommentsRe: Power BI JavaScript API support for Report Server
As part of our company's business offerings, we need to : Switch to a set page of the report Apply saved bookmarks and overall state to a report Get layout information of the report Modify the appearance of a report (hide visuals, modify position of visuals) In order to do so, we've relied on the embed API that has worked fine for us with the regular version of Power BI. However since that API is not available for the Report Server offer we're limited to the iframe which does not give us these features. Are there any news whether a Report Server embed API would be feasible ? We get a lot of traction from our clients to be compatible with the report server.779Views0likes0Comments
Data Privacy
Microsoft Fabric Community and Privacy
To learn more about how we manage your data, please review the Microsoft Fabric Community Data Privacy guide.