<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Flask App not passing variable to Javascript function in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Flask-App-not-passing-variable-to-Javascript-function/m-p/1782773#M28952</link>
    <description>&lt;P&gt;I'm kind of newbie in Power Bi embedded, webapps and similar topics.&lt;/P&gt;&lt;P&gt;But, I'm trying to create a portal, for sharing reports with people outside my organization (It's a little compaty, and doesn't fit the Power Bi Premium on our budget).&lt;/P&gt;&lt;P&gt;For this, I've discovered the Power Bi embedded solution and get the hands on the Webapplication.&lt;/P&gt;&lt;P&gt;I already have a power bi Pro licence, and I've created the application id, and etc&amp;nbsp;&lt;/P&gt;&lt;P&gt;So far so good, except the parameter for the&amp;nbsp;embed_info is not passing to the javascript function. (All of those I've got on microsoft's github).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the route code:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;@views.route('/render_report/&amp;lt;string:rep&amp;gt;/&amp;lt;string:usr&amp;gt;',&amp;nbsp;methods=['GET','POST'])&lt;/DIV&gt;&lt;DIV&gt;@login_required&lt;/DIV&gt;&lt;DIV&gt;def&amp;nbsp;render_report(rep,usr):&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;userid&amp;nbsp;=&amp;nbsp;usr&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;reportid&amp;nbsp;=&amp;nbsp;rep&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;new_record&amp;nbsp;=&amp;nbsp;ReportViews(report_id=reportid,&amp;nbsp;user_id=userid)&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;db.session.add(new_record)&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;db.session.commit()&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;user=current_user.id&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;report&amp;nbsp;=&amp;nbsp;Report.query.filter(Report.id.like(reportid)).first()&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;wrkid&amp;nbsp;=&amp;nbsp;report.pbiworkspaceid&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;repid&amp;nbsp;=&amp;nbsp;report.pbireportid&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;embed_info&amp;nbsp;=&amp;nbsp;PbiEmbedService().get_embed_params_for_single_report(workspace_id=wrkid,&amp;nbsp;report_id=repid)&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;embed_json&amp;nbsp;=&amp;nbsp;json.loads(embed_info)&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;url&amp;nbsp;=&amp;nbsp;embed_json['reportConfig'][0]['embedUrl']&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#return&amp;nbsp;embed_info&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return&amp;nbsp;render_template("render.html",&amp;nbsp;embed_info=embed_info,&amp;nbsp;user=current_user,&amp;nbsp;report=report,&amp;nbsp;url=url)&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;@views.route('/render',&amp;nbsp;methods=['GET'])&lt;/DIV&gt;&lt;DIV&gt;@login_required&lt;/DIV&gt;&lt;DIV&gt;def&amp;nbsp;render():&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return&amp;nbsp;jsonify({})&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;And here the HTML page of "render" is here&lt;/DIV&gt;&lt;DIV&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="data_edifyedu_0-1618327466898.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/493983i93D5C02D2AF65850/image-size/medium?v=v2&amp;amp;px=400" role="button" title="data_edifyedu_0-1618327466898.png" alt="data_edifyedu_0-1618327466898.png" /&gt;&lt;/span&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my base.html I've the script part aswell&lt;/P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="data_edifyedu_1-1618327496927.png" style="width: 886px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/493984iFE30637350D3374E/image-dimensions/886x62?v=v2" width="886" height="62" role="button" title="data_edifyedu_1-1618327496927.png" alt="data_edifyedu_1-1618327496927.png" /&gt;&lt;/span&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;Please help me!&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Many thanks&lt;/DIV&gt;&lt;DIV&gt;Omar&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Tue, 13 Apr 2021 15:24:19 GMT</pubDate>
    <dc:creator>data_edifyedu</dc:creator>
    <dc:date>2021-04-13T15:24:19Z</dc:date>
    <item>
      <title>Flask App not passing variable to Javascript function</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Flask-App-not-passing-variable-to-Javascript-function/m-p/1782773#M28952</link>
      <description>&lt;P&gt;I'm kind of newbie in Power Bi embedded, webapps and similar topics.&lt;/P&gt;&lt;P&gt;But, I'm trying to create a portal, for sharing reports with people outside my organization (It's a little compaty, and doesn't fit the Power Bi Premium on our budget).&lt;/P&gt;&lt;P&gt;For this, I've discovered the Power Bi embedded solution and get the hands on the Webapplication.&lt;/P&gt;&lt;P&gt;I already have a power bi Pro licence, and I've created the application id, and etc&amp;nbsp;&lt;/P&gt;&lt;P&gt;So far so good, except the parameter for the&amp;nbsp;embed_info is not passing to the javascript function. (All of those I've got on microsoft's github).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the route code:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;@views.route('/render_report/&amp;lt;string:rep&amp;gt;/&amp;lt;string:usr&amp;gt;',&amp;nbsp;methods=['GET','POST'])&lt;/DIV&gt;&lt;DIV&gt;@login_required&lt;/DIV&gt;&lt;DIV&gt;def&amp;nbsp;render_report(rep,usr):&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;userid&amp;nbsp;=&amp;nbsp;usr&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;reportid&amp;nbsp;=&amp;nbsp;rep&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;new_record&amp;nbsp;=&amp;nbsp;ReportViews(report_id=reportid,&amp;nbsp;user_id=userid)&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;db.session.add(new_record)&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;db.session.commit()&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;user=current_user.id&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;report&amp;nbsp;=&amp;nbsp;Report.query.filter(Report.id.like(reportid)).first()&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;wrkid&amp;nbsp;=&amp;nbsp;report.pbiworkspaceid&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;repid&amp;nbsp;=&amp;nbsp;report.pbireportid&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;embed_info&amp;nbsp;=&amp;nbsp;PbiEmbedService().get_embed_params_for_single_report(workspace_id=wrkid,&amp;nbsp;report_id=repid)&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;embed_json&amp;nbsp;=&amp;nbsp;json.loads(embed_info)&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;url&amp;nbsp;=&amp;nbsp;embed_json['reportConfig'][0]['embedUrl']&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#return&amp;nbsp;embed_info&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return&amp;nbsp;render_template("render.html",&amp;nbsp;embed_info=embed_info,&amp;nbsp;user=current_user,&amp;nbsp;report=report,&amp;nbsp;url=url)&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;@views.route('/render',&amp;nbsp;methods=['GET'])&lt;/DIV&gt;&lt;DIV&gt;@login_required&lt;/DIV&gt;&lt;DIV&gt;def&amp;nbsp;render():&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return&amp;nbsp;jsonify({})&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;And here the HTML page of "render" is here&lt;/DIV&gt;&lt;DIV&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="data_edifyedu_0-1618327466898.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/493983i93D5C02D2AF65850/image-size/medium?v=v2&amp;amp;px=400" role="button" title="data_edifyedu_0-1618327466898.png" alt="data_edifyedu_0-1618327466898.png" /&gt;&lt;/span&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my base.html I've the script part aswell&lt;/P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="data_edifyedu_1-1618327496927.png" style="width: 886px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/493984iFE30637350D3374E/image-dimensions/886x62?v=v2" width="886" height="62" role="button" title="data_edifyedu_1-1618327496927.png" alt="data_edifyedu_1-1618327496927.png" /&gt;&lt;/span&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;Please help me!&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Many thanks&lt;/DIV&gt;&lt;DIV&gt;Omar&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 13 Apr 2021 15:24:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Flask-App-not-passing-variable-to-Javascript-function/m-p/1782773#M28952</guid>
      <dc:creator>data_edifyedu</dc:creator>
      <dc:date>2021-04-13T15:24:19Z</dc:date>
    </item>
    <item>
      <title>Re: Flask App not passing variable to Javascript function</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Flask-App-not-passing-variable-to-Javascript-function/m-p/1786606#M29015</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/295753"&gt;@data_edifyedu&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Please review the content in the following links, hope they can help you.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://powerbi.microsoft.com/en-us/blog/easily-embed-secure-power-bi-reports-in-your-internal-portals-or-websites/" target="_self"&gt;&lt;STRONG&gt;Easily embed secure Power BI reports in your internal portals or websites&lt;/STRONG&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/javascript/api/overview/powerbi/" target="_self"&gt;&lt;STRONG&gt;Power BI embedded analytics Client APIs&lt;/STRONG&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.csgpro.com/blog/power-bi-embedded-examples/" target="_self"&gt;&lt;STRONG&gt;What You Need to Know About Power BI Embedded (With Examples)&lt;/STRONG&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;</description>
      <pubDate>Thu, 15 Apr 2021 10:08:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Flask-App-not-passing-variable-to-Javascript-function/m-p/1786606#M29015</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-04-15T10:08:19Z</dc:date>
    </item>
  </channel>
</rss>

