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: 
Moritz
Contributor III
Contributor III

Nprinting: how do I work in changes of a set expression within the connected app?

Hi,

Is there any how-to tutorial on how to perform changes in the connected app and fully work it into the Nprinting report?

I know, I have to reload metadata, but I don't find much help on how to proceed afterwards.

In the current case:

I have some complicated powerpoint Charts, I wouldn't want to completely redo. After the changes, the powerpoint output only displays the formula itself, but not the values.

Thanks in advance for any help!

 

Labels (1)
2 Solutions

Accepted Solutions
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi @Moritz

There are fev confusing things:

Your usecase of pages:

regarding pages read this: https://help.qlik.com/en-US/nprinting/May2023/Content/NPrinting/PowerPointReports/Page-Features.htm

It clearly says: "The page feature causes a separate slide to be created in PowerPoint for each field value." It meas you can only use fields from your data model and you cannot use calculated dimensions as a <page> tag. You can only use:

  • fields
  • or in case of Power Point template you can also use straight table objects. With tables you cannot have calculated dimensions in it, but you can have measures and measures can be encapsulated in variables or master items which i strongly suggest to do and I am not talking about refrencing measures in expressions editior I rather suggest to create whole master measure and use that instead for the NPrinting template. At the end you will decide what you want to do.
    • Lech_Miszkiewicz_0-1707970763753.png

Also with your expression - what are you trying to achieve with it? Waht is the purpose of If(statement). Note that in your expression tag "<" and ">" characters are replcaed with "_" so I was not sure how exactly the expression looks like. It seems like you are not wanting 0 values to be shown, but that could be easily achieved with number formatting and you wouldn't need If statement at all.

You also said "I had trouble with 3) update object <tag> string in the template."  What do you mean by that? You couldn't change the text in your Power point to reflect what the new formula looks like? or did you mean something else?

Cheers

Lech

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 @Moritz 

1. It is not master dimensions but master measures which i was talking about

2. regarding removing 0 values it is very simple - just disable keep source format and use custom format. You dont need expressions like yours to achieve what you need.  

#,##0;-#,##0; ;

Which represents

"positive value format " ; "negative value format" ; "zero value format" ; "text value format"

I dont know what regional settings you have in your environment so double check that the number format meets your region settings.

Lech_Miszkiewicz_0-1707997250227.png

more on this here: 

(excel topic but the same principles) https://www.ablebits.com/office-addins-blog/custom-excel-number-format/

Keep source formats and format in Qlik help explained: https://help.qlik.com/en-US/nprinting/February2024/Content/NPrinting/ReportsDevelopment/Designer-pro...

hope this helps

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.

View solution in original post

7 Replies
Ray_Strother
Support
Support

Hello,

1. Confirm you have refreshed the report and objects in Nprinting designer.
2. New objects need to refreshed after the cache has been regenerated.

Article links:

1. Working with Qlik objects

https://help.qlik.com/en-US/nprinting/May2023/Content/NPrinting/ReportsDevelopment/Qlik-objects-supp...
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi @Moritz 

It is very simple and it goes down to proper preperation and Qlik Sense app design. 

  1. I believe data which goes into power point chart is not based on variables as expressions or expressions are not master items - right?
    1. You just have expressions hardcoded directly in the chart/table object - right?
  2. Now when you look closely at <tags> in nprinting you will notice that they contain whole expression contenet when dragged-n-dropped to template. When you change your measure expression (which I believe you have hardcoded in expression window) that then changes whole string which needs have following steps afterwards:
    1. reload metadata connection
    2. update object in NPrinitng Designer (righ click -->update in left hand side property pannel)
    3. update object <tag> string in the template
    4. In nutshell you almost have to re-do drag&drop part of designing NPrinitng report

If you were using variables as expressions or master items those would not change and string withing the <nprinting tag> would remain the same which would save you ton of work and reduce the maintanance down to changing expression in variable or master item - simple as that - for example:

Example below shows you 3 columns doing the same - one is having naked expression, second has the same expression in master measure and third has the same expression in variable. When brought in to NPrinting they look like this:

Lech_Miszkiewicz_0-1707857971991.png

So change in expression (1) which has naked formula requires metadata update and update of object in designer and template as string with expression will change and will no longer work in template:

Lech_Miszkiewicz_1-1707858054659.png

Expressions 2 & 3 will have the same strig despite underlying expression being updated in Qlik Sense which will save you a lot of work on NPrinting side, debugging and testing in the future. 

Since you are making this change now I suggest you convert your expressions either to master items or variables and use those going forward so any future changes will save you time when done.

 

Now you know why prep is so important long term and what you need to do to avoid this again in the future.

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.
Moritz
Contributor III
Contributor III
Author

Hi,

thanks so much already for your help @Ray_Strother  @Lech_Miszkiewicz !

Confirming that I reloaded meta data and updated the objects. I had trouble with
3) update object <tag> string in the template.
So far I didn't use Master Items, as none of them is showing up in the fieldlist, if I want to use them within the "page" object to cycle through:

Moritz_0-1707928289914.png

 

Can I nevertheless use Master Items within the set expressions?


To give you an example of an expression I have to use - see below - I work with a variable, which itself is hard-coded. (vPreviousYear)
<if(Sum({_ [Invoiced Date Fiscal.Fiscal Year Value]={'$(vPreviousYear)'}, [Sales Invoice Fact.Unit Selling Price]={"_0"}, [Invoiced Date Fiscal.Months From Current Fiscal Month] -= {'0'}_} [Sales Invoice Fact.Net Invoiced Quantity Reporting]) _ 0,Sum({_ [Invoiced Date Fiscal.Fiscal Year Value]={'$(vPreviousYear)'}, [Sales Invoice Fact.Unit Selling Price]={"_0"}, [Invoiced Date Fiscal.Months From Current Fiscal Month] -= {'0'}_} [Sales Invoice Fact.Net Invoiced Quantity Reporting]),'')_2>

 

Thanks,

Moritz

 



 

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi @Moritz

There are fev confusing things:

Your usecase of pages:

regarding pages read this: https://help.qlik.com/en-US/nprinting/May2023/Content/NPrinting/PowerPointReports/Page-Features.htm

It clearly says: "The page feature causes a separate slide to be created in PowerPoint for each field value." It meas you can only use fields from your data model and you cannot use calculated dimensions as a <page> tag. You can only use:

  • fields
  • or in case of Power Point template you can also use straight table objects. With tables you cannot have calculated dimensions in it, but you can have measures and measures can be encapsulated in variables or master items which i strongly suggest to do and I am not talking about refrencing measures in expressions editior I rather suggest to create whole master measure and use that instead for the NPrinting template. At the end you will decide what you want to do.
    • Lech_Miszkiewicz_0-1707970763753.png

Also with your expression - what are you trying to achieve with it? Waht is the purpose of If(statement). Note that in your expression tag "<" and ">" characters are replcaed with "_" so I was not sure how exactly the expression looks like. It seems like you are not wanting 0 values to be shown, but that could be easily achieved with number formatting and you wouldn't need If statement at all.

You also said "I had trouble with 3) update object <tag> string in the template."  What do you mean by that? You couldn't change the text in your Power point to reflect what the new formula looks like? or did you mean something else?

Cheers

Lech

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.
Moritz
Contributor III
Contributor III
Author

@Lech_Miszkiewicz 

thanks again for your great help, I will test the master dimension approach then, for the measures.

For the is statement: You're right, this serves to remove the 0. Unfortunately, I didn't find a better solution to not display 0s within a powerpoint chart data table, as the formating options are very limited in this.

Moritz_0-1707984684130.png

Concerning "I had trouble with 3) update object <tag> string in the template.": Guess this was just an error on my side, it now works fine, when I drag 'n drop the field I updated.

Thanks again!!

 

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi @Moritz 

1. It is not master dimensions but master measures which i was talking about

2. regarding removing 0 values it is very simple - just disable keep source format and use custom format. You dont need expressions like yours to achieve what you need.  

#,##0;-#,##0; ;

Which represents

"positive value format " ; "negative value format" ; "zero value format" ; "text value format"

I dont know what regional settings you have in your environment so double check that the number format meets your region settings.

Lech_Miszkiewicz_0-1707997250227.png

more on this here: 

(excel topic but the same principles) https://www.ablebits.com/office-addins-blog/custom-excel-number-format/

Keep source formats and format in Qlik help explained: https://help.qlik.com/en-US/nprinting/February2024/Content/NPrinting/ReportsDevelopment/Designer-pro...

hope this helps

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.
Moritz
Contributor III
Contributor III
Author

 @Lech_Miszkiewicz Why make it simple when it can be complicated? 

Thanks so much again, this works great now!

The only thing which doesn't work so far is the conditional format to show M an K in case of big numbers:

[>=1000000] $# ##0.0,, "M" ;[<1000000] $# ##0.0, "K"

Please allow me a follow-up question as this seems inviting to use. Do you see this working on your end?

Thanks,

Moritz