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: 
nareshthavidishetty
Creator III
Creator III

filter in Nprinting

hi all

im new to Nprinting i got stuck could anyone help me plz

my requirement is i want to generate a report month wise which i had accomplished but if i want 15 days back or 20 days back how can i do in Nprinting

date field is (Date_trans)

Daniel can you help me,

help me out some one

1 Solution

Accepted Solutions
Daniel_Jenkins
Specialist III
Specialist III

Hi Naresh,

If you have variables in your QlikView document that store the dates for the range required you can use a filter in QlikView NPrinting to restrict output to records that fall within that date range.

Lets say you have variables vStartDate & vEndDate like this:

You can see that records in the unfiltered chart have DateTrans values that fall within and also out of this date range:

You can use a Field filter like this on the report:

To get filtered Excel output like this:

Project attached. Extract to folder C:\Temp\Community\058 or change the paths in the NSQ.

HTH - Daniel.

View solution in original post

20 Replies
avinashelite

You could create a filter for the same , write the expression in the Qlikview and apply the same in the Npriting

check this

How to Create Static and Dynamic Filters Based on Fields

Filtering in nPrinting for a Qlikview report | Qlik Community

nareshthavidishetty
Creator III
Creator III
Author

thanks for the reply Avinash i have gone  through the document but my requirement is i need all the date ranges

like if user want to see last 2 weeks wise data,or last 3 months wise data or, last 10 days data etc

plz tell me how i do that requirement

any sample  example would be helpfull

avinashelite

you Could try like this

1.Capture the user requirement in variable i.e. like 1month or 10 days etc

2. Use this variable in the Nprirting to set the data range (write a expression in the Qlikview to get the date range )

3. Based on the expression the date range will get set automatically according to the user requirement

*Currently I don't have the QV

nareshthavidishetty
Creator III
Creator III
Author

if i create variable like what u said then i will end up with more variables like for week range 1 variable ,for 10 days 1 variable or 15 days range 2 variables so on....

i'm bit confused any suggestions would be helpfull

thanks

avinashelite

No , create one variable but create  multiple buttons  or text objects so based on the click of button/text add the action to set the same variable so that it will be always on variable at the backend , based on the use selection the variable will get set

nareshthavidishetty
Creator III
Creator III
Author

Hi Avinash

thanks for the reply could you please tell me the steps so that i follow and create the variables

plz dont mind as i m new to this it is very helpful if you jus tell me how to do what u mentioned in the above like creating text and setting variables

thanks

nareshthavidishetty
Creator III
Creator III
Author

anyone plz help me im still stuck and i need to finish this things waiting for ur valuable suggestions

thanks

avinashelite

Try like this

1.Create a variable (Ctrl+V) , vNumber_of_days

2. Add three text object like 2.1 10 days

                                         2.2  15 days

3. Add action in each text box , Go to text box properties > Action > select external > Set variable

4. vNumber_of_days and in value add 10 or 15 etc based on the text object

once the use click on the object the variable will get set and you could use the same

EG

if(Date_field>= Today()-vNumber_of_days and Date_field<= today(), Date_field)

or

only({<Date_field={">= Today()-vNumber_of_days <= today()"}>}Date_field)

nareshthavidishetty
Creator III
Creator III
Author

thanks for the reply i vll try and let u know