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: 
Not applicable

Nprinting report result doesn't change as Qlikview variable values change

Hi all,

I am new to QV and NPRINTING. I created a NPRINTING report to show Vacancy days of properties in a particular period. In QV, there are two variables:  vFrom and vTo. I assumed when I change values of vFrom and vTo, NPrinting report result will change accordingly.

But report didn't change and only showed the result when I created it.

I am thinking to create two filters of From and To, and add variables in filters. As I need to give value to the variable, does it mean I have to create as many variables as periods selected in QV?? Can anyone help me?

NP.PNG

6 Replies
Not applicable
Author

it depends how you are using your variables within the report.  It sounds like you want the report to contain inforamtion between a date range (from and to).  If that is the case, you would want to create filters and add the filter to the report.  When the report runs, the filter is applied.

Also make sure you check clear selection in your connection to avoid any selections made in the applciation affecting your report

the attached link shows filter for current year and last year as an example

How to Report Sales for Last Year and This to Date – Customer Feedback for Vizubi

an example of variables as filters

How to Set a QlikView Variable to a Specific Value Using Filters – Customer Feedback for Vizubi

Not applicable
Author

Hi Grace,

I have lots of dates filters using variables, but the way I use them is this:

Create the variable in QV (say, vYesterday = FirstWorkDate(today(1)-1,1,$(vHolidays)) <- more about vHolidays later

In your nPrinting filter, pick the Field from your QV ("Occupancy Date"?), and then create the filter with the

expression "=vYesterday". Note: you must reload your QV file to get the right date before running your report. Check both the "IsNumeric" and "Evaluate" boxes.

vHolidays is an enumerated list of Holiday dates e.g. (12/25/15, 12/26/15, 1/1/16, etc.). These can be stored offline in an Excel file, read into your QV at startup via IncludeFiles, and updated once a year. Using vHolidays in all your date filters saves you from having to change each one as Holiday dates change.

Not applicable
Author

Thanks Adam

The variables in QV, vFrom and vTo , can be any dates.  My purpose is to make NP report changes according to dates input in variables, so I am thinking about to create a NPrinting filter from QV current selection. I haven't tried. No idea if it works.

Not applicable
Author

Thanks Kevin,

The variables in QV, vFrom and vTo , can be any dates.  I am thinking about to import current selections of QV into NPrinting filter.

Not applicable
Author

I didn't create filters. I simply added vFrom and vTo into report template editor, then drag them into report.

It works. The report result now changes with QV variable values. You guys did give me good ideas. Thanks you all. 

variable.PNG

v2.PNG

agni_gold
Specialist III
Specialist III

Hi friends ,

I am facing issue with current selection box in nprinting report, i have created formula in nsq file as getcurrentselection function and added to nprinting report , so only year and month are coming but other field selection are not coming , please help me why other filed are not coming in my current selection .

I have checked in my template also , in my PPT template there are two slides , but when i am trying current selection formula at first slide it is working. But when using in second slide it is only showing year and month selection in as current selection not other fields.