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

Adjusting Image size dynamically in Nprinting HTML report

Hi All

I have a unique problem for which I am not getting any solution.

I am trying to create a HTML template as follows.

<html>
<head>
<meta name ="viewport" content="width=device-width,initial-scale=1.0">
</head>
<body>
<p>
Hi All
<br>
<br>Please find below the status update .
</p>
<div>
<img src="%%bWx%%" alt="bWx">
</div>
<br>

<div>
<img src="%%jLZ%%" alt="jLZ">

<br>
<p>
<b>Please refer to following links for detailed information</b>

</p>
<a href="https://xyz">Visualization Dashboard</a>
<p>
Many thanks
</p>
</div>
</body>
</html>

Now the problem is image src="%%jLZ%%" can have dynamic rows anything between 2 to 10 and I have set the Data displayed height to 1350px. Now when 10 rows are coming all looks good but when 2 rows are coming in the chart then there is a big space between the chart image and the text below it (Please refer to following links .....) which is not looking good.

Any suggestions ?

Nprinting designer version: May 2022 SR1

QS version : May 2021 Patch 6

Many thanks

Manish Kukreti

 

Labels (2)
2 Solutions

Accepted Solutions
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi, Sure you can an, but will need to create them by creating grouping dimensions in your Qlik Sense data model so they can be simply reflected just as another row in straight table data. You can then also manipulate your CSS style based on this to highlight such rows. 

Details about subtotals were discussed many times on community: for example: https://community.qlik.com/t5/Qlik-NPrinting/Dimension-wise-Sub-total-in-Nprinting-html/td-p/1875019

 

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.

View solution in original post

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi @Manish ,

you would need to create grouping dimension and use that a a column in the table. Dim1 would be your normal dimension, and Dim2 would be your grouping dimension. sample below. then instead of using dim 1 you would use dim2 in the table. That is concept used to create subtotals, grand totals, P&Ls etc in straight tables. I can only point you in the direction as those kinds of solutions are very much based on individual scenarios so detailed explanation can be hard at the moment. 

dim1 dim2

a

a
b b
a grand total
b grand total

 

With the above your Grand Total is basicaly just another value in straight table

hope this makes sense

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.

View solution in original post

12 Replies
Frank_S
Support
Support

Hi @Manish

To better understand the issue I suggest that you place some images into this conversation thread which describe:

  • Expected Results
  • Actual Results

If you have sensitive data, please use this attached dashboard to build the report and show us (as per above) the issue.

Kind regards...

Please remember hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

An top of Franks points i would add what is in the image and why it is an image and not text/data/table?

i can understand that if we are talking about chart (like bar chart, or line chart or map…) then image might be required, however in case this is a text or table then better solution would be to do everything as “data/text” in html

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.
Manish
Creator
Creator
Author

Hi @Lech_Miszkiewicz 

Thanks for replying. 

The problem with the data/table is that the format of the pivot table is going for the toss even after checking "Keep Source Formats" option in the properties. For example , Borders are not visible, Header background color is not coming up etc.

Manish
Creator
Creator
Author

Hi @Frank_S 

Thanks for your response.

Please find the attached image. As you can see there is a gap between the Pivot table image and the text written at the bottom and the reason for that is, I have explicitly defined "Data Displayed Height (px)"  value as 1350 for the image so that more rows can be accumulated without having a scroll bar.

I was of the opinion that it will adjust the height as per the number of rows coming and also this is what my expectation is 

Ruggero_Piccoli
Support
Support

Hi,

Check in the original HTML if the image of the table has a white area on the bottom that moves the text down.

I agree with @Lech_Miszkiewicz and I suggest you to do a test with the source table added as table instead of image.

Best Regards,

Ruggero



Best Regards,
Ruggero
---------------------------------------------
When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads with a LIKE if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads with LIKEs if you feel additional info is useful to others.
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

@Manish 

I dare to disagree. With little bit of development it all can be done. I have posted about it in here: 

https://nprintingadventures.com/2020/04/24/how-to-build-html-pivot-table-in-nprinting/

cheers

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.
Frank_S
Support
Support

Hi @Manish

It seems you already have received some positive answers to help you overnight.

Not much more I can add to those helpful points shared by @Lech_Miszkiewicz and @Ruggero_Piccoli

Kind regards...

Please remember hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Manish
Creator
Creator
Author

Hi @Lech_Miszkiewicz 

Thanks for sharing this. It was really helpful.

Just one question, can we also have Subtotals for each dimension in the final Nprinting pivot table output?

 

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi, Sure you can an, but will need to create them by creating grouping dimensions in your Qlik Sense data model so they can be simply reflected just as another row in straight table data. You can then also manipulate your CSS style based on this to highlight such rows. 

Details about subtotals were discussed many times on community: for example: https://community.qlik.com/t5/Qlik-NPrinting/Dimension-wise-Sub-total-in-Nprinting-html/td-p/1875019

 

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.