@@ -152,6 +152,48 @@ function _Embed_BasicEmbed_Mobile() {
152
152
} ) ;
153
153
}
154
154
155
+ // ---- Paginated Embed Code ----------------------------------------------------
156
+ function _Embed_PaginatedReportBasicEmbed ( ) {
157
+ // Read embed application token from textbox
158
+ var txtAccessToken = $ ( '#txtAccessToken' ) . val ( ) ;
159
+
160
+ // Read embed URL from textbox
161
+ var txtEmbedUrl = $ ( '#txtReportEmbed' ) . val ( ) ;
162
+
163
+ // Read paginated report Id from textbox
164
+ var txtEmbedReportId = $ ( '#txtEmbedReportId' ) . val ( ) ;
165
+
166
+ // Read embed type from radio
167
+ var tokenType = $ ( 'input:radio[name=tokenType]:checked' ) . val ( ) ;
168
+
169
+ // Get models. models contains enums that can be used.
170
+ var models = window [ 'powerbi-client' ] . models ;
171
+
172
+ // Se view permissions.
173
+ var permissions = models . Permissions . View ;
174
+
175
+ // Embed configuration used to describe the what and how to embed.
176
+ // This object is used when calling powerbi.embed.
177
+ // This also includes settings and options such as filters.
178
+ // You can find more information at https://github.com/Microsoft/PowerBI-JavaScript/wiki/Embed-Configuration-Details.
179
+ var config = {
180
+ type : 'report' ,
181
+ tokenType : tokenType == '0' ? models . TokenType . Aad : models . TokenType . Embed ,
182
+ accessToken : txtAccessToken ,
183
+ embedUrl : txtEmbedUrl ,
184
+ id : txtEmbedReportId ,
185
+ permissions : permissions ,
186
+ } ;
187
+
188
+ // Get a reference to the paginated embedded report HTML element
189
+ var paginatedReportContainer = $ ( '#paginatedReportContainer' ) [ 0 ] ;
190
+
191
+ // Embed the paginated report and display it within the div container.
192
+ var report = powerbi . embed ( paginatedReportContainer , config ) ;
193
+
194
+ Log . logText ( "Loading Paginated Report." ) ;
195
+ }
196
+
155
197
function _Embed_VisualEmbed ( ) {
156
198
// Read embed application token from textbox
157
199
var txtAccessToken = $ ( '#txtAccessToken' ) . val ( ) ;
@@ -1163,6 +1205,19 @@ function _Report_Reload() {
1163
1205
} ) ;
1164
1206
}
1165
1207
1208
+ function _PaginatedReport_Reload ( ) {
1209
+ // Get a reference to the paginated report HTML element
1210
+ var paginatedReportContainer = $ ( '#paginatedReportContainer' ) [ 0 ] ;
1211
+
1212
+ // Get a reference to the embedded paginated report.
1213
+ paginatedReport = powerbi . get ( paginatedReportContainer ) ;
1214
+
1215
+ // Reload the displayed paginated report
1216
+ paginatedReport . reload ( ) ;
1217
+
1218
+ Log . logText ( "Reload Paginated Report" ) ;
1219
+ }
1220
+
1166
1221
function _Report_Refresh ( ) {
1167
1222
// Get a reference to the embedded report HTML element
1168
1223
var embedContainer = $ ( '#embedContainer' ) [ 0 ] ;
@@ -1380,6 +1435,43 @@ function _Report_ExitFullScreen() {
1380
1435
report . exitFullscreen ( ) ;
1381
1436
}
1382
1437
1438
+ // ---- PaginatedReport Operations ----------------------------------------------------
1439
+
1440
+ function _PaginatedReport_GetId ( ) {
1441
+ // Get a reference to the embedded report HTML element
1442
+ var paginatedReportContainer = $ ( '#paginatedReportContainer' ) [ 0 ] ;
1443
+
1444
+ // Get a reference to the embedded report.
1445
+ paginatedReport = powerbi . get ( paginatedReportContainer ) ;
1446
+
1447
+ // Retrieve the report id.
1448
+ var reportId = paginatedReport . getId ( ) ;
1449
+
1450
+ Log . logText ( reportId ) ;
1451
+ }
1452
+
1453
+ function _PaginatedReport_FullScreen ( ) {
1454
+ // Get a reference to the paginated embedded report HTML element
1455
+ var paginatedReportContainer = $ ( '#paginatedReportContainer' ) [ 0 ] ;
1456
+
1457
+ // Get a reference to the paginated embedded report.
1458
+ paginatedReport = powerbi . get ( paginatedReportContainer ) ;
1459
+
1460
+ // Displays the paginated report in full screen mode.
1461
+ paginatedReport . fullscreen ( ) ;
1462
+ }
1463
+
1464
+ function _PaginatedReport_ExitFullScreen ( ) {
1465
+ // Get a reference to the paginated embedded report HTML element
1466
+ var paginatedReportContainer = $ ( '#paginatedReportContainer' ) [ 0 ] ;
1467
+
1468
+ // Get a reference to the paginated embedded report.
1469
+ paginatedReport = powerbi . get ( paginatedReportContainer ) ;
1470
+
1471
+ // Exits full screen mode.
1472
+ paginatedReport . exitFullscreen ( ) ;
1473
+ }
1474
+
1383
1475
function _Report_switchModeEdit ( ) {
1384
1476
// Get a reference to the embedded report HTML element
1385
1477
var embedContainer = $ ( '#embedContainer' ) [ 0 ] ;
0 commit comments