Skip to main content
Announcements
Defect acknowledgement with Nprinting Engine May 2022 SR2, please READ HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
Manish
Creator
Creator

Split table to multiple slides in PowerPoint file

Hi, 

I am trying to create a nprinting ppt report and if the chart is too long in terms of no. of rows then I would like split it to multiple slides.

Is this something possible?

Nprinting version : Qlik NPrinting May 2022 SR1

Qlik Sense version: Qlik Sense February 2023 Patch 3.

Looking forward to the response.

Qlik NPrinting

Many thanks  

Manish

Labels (2)
2 Replies
JonnyPoole
Employee
Employee

Maybe. 

You could use the 'page' feature to repeat the chart 'N' times where N is the number of distinct values found in a data field that you add in the data model. 

You need to determine which dimension or combination of dimensions defines the number of rows in the chart that you need to potentially split. 

In a simple scenario its a single dimension like 'City'. 

CountCities

LOAD DISTINCT

City

Resident <TableWithCity>;

let vNumCities=noofrows('CountCities');

Now you need to decide how many rows are the maximum for each slide. Lets say its '10'. 

let vNumRowsPerSlide=10;

Since you know the maximum you can now reload the City valies once more counting the row number and dividing by the number of rows per slide to create an integer slide number:

 

CityOnSlide:

LOAD DISTINCT

ceil(rowno()/$(vNumRowsPerSlide)) as CitySlideNumber.

City

RESIDENT CountCities;

It should give you a simple dimension in the data model where rows 1-10 have a slide number of 1 and will be 'paged' in the NPrinting report onto slide1.  Rows 11-20 have a slide number of 2 and will be 'paged' onto slide 2 etc...

You don't need the CountCities table any more so:

drop table CountCities; 

Make sure the 'City' field in the CityOnSlide table links to your data model correctly. 

Now reload the metadata into NPrinting so the CitySlideNumber field is available. 

Add a 'page' to your NPrinting report and select 'CitySlideNumber' for the page. 

That should work. 

You can do this with multiple dimensions too, but you should create a key in the data model first. 

If you need to do this is a dynamic / filtered way such as with a cycle it creates a complication as calculated dimensions that are not pre-calculated in the data model are not really supported.

I suppose you could make the 'CityOnSlide' table more sophisticated loading the cities multiple times into the table with table concatenation  to represent the row and page numbers differently for different filter conditions. Lets say I wanted 5 rows per page and I have to cycle this report for 2 cycle values. It could also be that I want 2 different filters. 

City, Filter, Row, Slide

City A, Filter 1, 1, 1  

City B, Filter 1, 2, 1

City C, Filter 1, 3, 1

City D, Filter 1, 4, 1

City A, Filter 2, 1, 1  

City B, Filter 2, 2, 1

City C, Filter 2, 3, 1

City D, Filter 2, 4, 1

City E, Filter 2, 5, 1

City F, Filter 2, 6, 2

In this situation I can filter the report 2 ways:  Filter=filter 1 or Filter=Filter2. Or I could just cycle on filter to create 2 reports. 

when I filter on filter 1,  only 4 Cities are included and they all 'page' onto the first slide and thats it. 

But when I filter on filter 2, 6 Ctiies are included. The 'page' will split the data onto 2 slides, Slide 1 and Slide 2. 

I hope this helps you find a pathway to accomplish your need!

David_Friend
Support
Support