Skip to content

Commit ce5baeb

Browse files
authored
Merge pull request microsoft#90 from Microsoft/update-demo
Add print and reload to live demo.
2 parents cba63db + e2b7c3c commit ce5baeb

3 files changed

Lines changed: 20 additions & 2 deletions

File tree

‎demo/app/index.js‎

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,24 @@ $(function () {
2222
}
2323
});
2424

25+
var $getId = $('#getId');
26+
$getId.on('click', function (event) {
27+
alert(staticReport.getId());
28+
});
29+
2530
var $fullscreen = $('#fullscreen');
26-
2731
$fullscreen.on('click', function (event) {
2832
staticReport.fullscreen();
2933
});
34+
35+
var $reloadReport = $('#reloadReport');
36+
$reloadReport.on('click', function (event) {
37+
staticReport.reload()
38+
.catch(error => { alert(error); });
39+
});
40+
41+
var $printReport = $('#printReport');
42+
$printReport.on('click', function (event) {
43+
staticReport.print();
44+
});
3045
});

‎demo/bower.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"es6-promise": "^3.2.2",
2121
"bootstrap": "^3.3.6",
2222
"jquery": "^3.1.0",
23-
"powerbi-client": "2.0.0-beta.12"
23+
"powerbi-client": "^2.2.1"
2424
},
2525
"devDependencies": {}
2626
}

‎demo/index.html‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@ <h2>Static Embed</h2>
3333

3434
<br>
3535
<p>
36+
<button type="button" id="getId" class="btn btn-warning">Get Report ID</button>
3637
<button type="button" id="fullscreen" class="btn btn-warning">Toggle Fullscreen</button>
38+
<button type="button" id="reloadReport" class="btn btn-warning">Reload Report</button>
39+
<button type="button" id="printReport" class="btn btn-warning">Print Report</button>
3740
</p>
3841
</div>
3942

0 commit comments

Comments
 (0)