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: 
MaheshKumar
Contributor
Contributor

Qlik Variables in Dynamic File Naming is not working properly in Nprinting Feb 2020

Hello ,

Can someone please help on this. It's a bit urgent.

  • We have installed Qlik Nprinting 20.0.2(February 2020) and Qlikview Desktop 12.40 versions respectively.
  • From Nprinting, we are trying to generate the report by enabling Dynamic naming. The expected output report should be in format "ReportName_vMonthYear.xslx" (Example: Report123_May2018.xslx). 
  • Here vMonthYear is the Qlikview variable which has the expression: =GetFieldSelections(Month)&GetFieldSelections(Year)
  • But the actual report that is getting generated is not fetching the Qlik variable vMonthYear value. The output we are getting is Report123_-.xlsx (vMonthYear is coming as "-").
  • The Qlikview variables with GetFieldSelections function is not working in Nprinting.

And also, We have observed that if the Qlikview variable has Static value (like hard-coded value), then that variable is getting passed to Nprinting and the Qlik variable in dynamic file name is getting generated Properly. But if the Qlikview variable is computed by making use of any Field then that value is not getting passed to Nprinting and the output is coming as "-" in the dynamic file name.

We have tried various options by creating the new variable in Qlikview and storing this vMonthYear value: 

  • vTest=vMonthYear
  • vTest=$(vMonthYear)
  • vTest='$(vMonthYear)'
  • vTest=$(=vMonthYear)

and passing this newly created variable (vTest) in Nprinting Dynamic file naming. But nothing worked out.

If someone has encountered this issue, Please help.

Thank You.

Labels (2)
9 Replies
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi @MaheshKumar 

What documentation have you studied so far?

Have you read about variables in NPrinting and they behaviour which is different to what you can get when using them in Qlik? https://help.qlik.com/en-US/nprinting/April2020/Content/NPrinting/Troubleshooting/Variables-dont-exp...

I tested it and in my case everything worked as per design.

So what were my steps:

  • create variable in QlikView 
  • enter formula to return SELECTIONS from chosen fields
  • make sure formula starts with "=" sign as it needs to be expanded prior being passed to NPrinting (as per documentation)
  • apply filters on Month and Year fields - as formula used in your variables requires those filters to be applied on those fields
  • setup report to use dynamic names and pointed to variable
  • run task to send it to my email

All worked as it should. If it does not work for you it seems like you may be using wrong variable expression, maybe you are missing "=" sign or maybe you are not applying filters (which are required since you are using "GetFieldSelection()" function.

See screenshots for reference:

1.png2.png3.png

 

5.png4.png6.png

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.
MaheshKumar
Contributor
Contributor
Author

Hi @Lech_Miszkiewicz 

Thank you for your Quick response by replicating the steps.

We have = sign before the expression and we've tried by applying the filters too. 

Please find the attached document for the steps we followed which are similar to yours. 

The Variable value itself is not getting passed to Nprinting. When we run the task, the task is getting failed saying cannot apply filters (Complete Error details are in the attached document). Even we've verified in Nprinting Designer by dragging that variable onto the template, we are getting "-", it is not fetching any value. 

Can you please let us know the Nprinting version on which you have verified ?

Thank You.

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Well,

That changes everything. It is not a variable which is not getting passed. It is a filter which you are passing wrong to start with.

Check screenshot of my filters and notice that I applied "numerical value is", so for November you should apply numerical value is 11 and for year you should apply numerical value is 2017.

Since you are not applying filters your variable cannot produce (using this expression in it) any values. 

 

I have tested this on few versions of NPrinting starting from Nov 2019, through Feb 2020 and April 2020

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.
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

also read this about filters:

https://nprintingadventures.com/2019/02/15/the-pitfalls-of-nprinting-filters-part-1-dates-and-duals/

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.
MaheshKumar
Contributor
Contributor
Author

@Lech_Miszkiewicz 

Thanks for your response and it is very helpful.

It is working for Static values. It is working if we manually update the filter (numerical values to Month/Year).

But we are looking to pass the dynamic value to this filter, meaning the filter has to be applied once we select the Month/Year in Qlikview and after reloading the metadata in Nprinting. 

Example: Selected Month - Nov, Selected Year - 2018. If we pass Filter (Numerical value for Month -11, Numerical value for Year- 2018), it is working fine. 

Again if we select Month as "Jan" and Year as "2020" in the Qlikview, after reloading the metadata in Nprinting, We want to update this filter to reflect Jan2020 but not Nov2018 which was previously defined manually.

We have tried by passing variable using Evaluate value Option in the filter, but it is not working.

Could you please share your insights on how to pass this dynamic filter values.

Thank you.

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

This is not how NPrinting works. Selections done in QlikView will not work for reasons below:

  • NPrinting clears all selections
  • NPrinting is not supporting triggers nor macros
  • NPrinting is not supporting always one selected values

Setting filter in QlikView will have no effect. 

"Again if we select Month as "Jan" and Year as "2020" in the Qlikview, after reloading the metadata in Nprinting, We want to update this filter to reflect Jan2020 but not Nov2018 which was previously defined manually." 

What you have written above is never going to work as this is not how NPrinting works!!!

Selecting values in QlikView interface will only work with NPrinting OnDemand which you are not mentioning here at all.

 

Dynamic filters can be applied using Evaluate value option or Advanced search depending on your requirement.

I also suggest you get a NPrinting training first as it seems like you don't really know how Nprinting works. Going through whole help.qlik.com nprinting section would be good start. 

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.
MaheshKumar
Contributor
Contributor
Author

@Lech_Miszkiewicz 

Thanks for sharing your views. Agreed that I don't have much expertise as I'm new to Nprinting 🙂 

Just to provide you more details, We have recently upgraded from Nprinting 16.6 to Nprinting 20.0 (Feb 2020).

In earlier version(16.6), We were capturing the current selections of the field in the variables and based on the selections we made in Qlikview each time, we were getting that respective value from the variable in Nprinting after refreshing the connection. We haven't created any filters as such.

  • Select Month/Year in Qlikview application (Ex: Nov-2019)
  • Save the application
  • Refresh the connection in Nprinting. (Connection pointing to the above Qlikview application)
  • Make sure the dynamic filename uses that variable.
  • Variable in the dynamic filename updated with the latest value.

Below is the sample screenshot from Nprinting Designer 16.6

MaheshKumar_0-1591011908743.png

So after upgrading, we expected the similar kind of behavior in the latest version of Nprinting(20.0) which is not the case. We are not getting the selected value in the qlikview application from the variable in Nprinting. By creating the filters we are getting it, but that is of not dynamic. 

Please let us know if there is any other way to achieve this or if we've missed anything, so that we can try. It should work as it was working in the older versions 🙂

We didn't find much information on this in the Nprinting migration document as well.

We didn't mention On-demand as we are talking about the Qlikview application and not the Qlikview Accesspoint interface.

Appreciate your help on this.

Thank You.

 

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Regarding your comment:

„So after upgrading, we expected the similar kind of behavior in the latest version of Nprinting(20.0)„

No, this is not how Nprinting 17+ works, and to be frank you have taken quite strange appriach with v16 too, but its your choice. 

regarding NPrinting Feb 2020 - this is different product, works differently than v16 and you cannot expect the same behaviour. 

You may have to come back to drawing board with someone experienced with Nprinting, explain requirements, asses possibilities as what you were doing in v16 is no longer possible and you have take different approach

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.
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

What surprises me is why would you save qvw with particular selections applied, then reload metada then produce report... when instead You can just apply the same in  nPrinting filters...

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.