Qlik Community

Qlik NPrinting Discussions

Discussion Board for collaboration on Qlik NPrinting.

Customer & Partners, DEC. 9, 11 AM ET: Qlik Product & Strategy Roadmap Session: Data Analytics REGISTER NOW
Showing results for 
Search instead for 
Did you mean: 
Contributor II
Contributor II

Display actual StartDate and EndDate in NPrinting report generated via OnDemand functionality

Hello Qlik Community! 

This question is similar to a request asked in this thread. 


But, let me explain the objective and some of the options that I tried, which may/may not be helpful for other folks having a similar problem.

Users / Customers would select a date range + other filters (e.g. UserID) and then generate its corresponding report via NPrinting Ondemand Report Generation within QlikSense. 

This works fine on a data level, but the main objective is that, we would also want to represent the start date and end date of the date range actually selected by the user in the NPrinting Report. But unfortunately, as confirmed in the link above, it just shows the start date and end date for which there is data. 

For e.g., We select the date range in QlikSense as 1/1/2019 - 12/31/2019 for a UserID and generate the corresponding NPrinting report via OnDemand functionality. But, the start date and end date in the NPrinting report shows as 5/1/2019 - 5/30/2019; because there is data only for that date range. 

Below are the options that I tried to circumvent this problem. 

  1. I created 2 variables in QlikSense which will extract the actual start date and end date that user selected via daterange; that is 1/1/2019 and 12/31/2019 using
    vStartDate=Date(TextBetween(GetFieldSelections(DateRangeField), '>=','<='))  -------> 1/1/2019
    vEndDate = Date(TextBetween(GetFieldSelections(DateRangeField), '<=','')) ----------> 12/31/2019
    I then tried to use the variable in Qlik NPrinting directly to print the vStartDate and vEndDate. Even though I understand that GetFieldSelections() doesn't pick the actual user inputted user daterange for OnDemand NPrint report, it is possible to get the actual start and end date using the above formula in QlikSense. Hence, I thought since no formula is computed within NPrinting, it would send the variable to Qlik Sense and thereby fetch the actual inputted start and end date; i.e. 1/1/2019 and 12/31/2019
    But, this did not work. 
  2. The other option I thought was to create 2 StartDate and EndDate data islands within my QlikSense model, ONLY for printing the actual input StartDate and EndDate in the NPrinting Report.
    I was wondering if there were any ways to pass the date values selected:
    Passing the value from StartDate and EndDate data island fields selected by user to then generate the daterange for the actual DateRange Field on which the data should be filtered.
    Passing the value from DateRange field the user selected to StartDate and EndDate data island fields which will represent the actual inputted Start Date and End Date in the NPrinting report.

Ultimately, the user should select the Date Range only ONCE while in QlikSense to generate the NPrinting report via OnDemand, but,  obviously that should not be the data islands StartDate and EndDate fields, because every single calculation becomes an unnecessary set analysis and the whole report becomes extremely slow (because now the DateRange field is not filtering the records).

To summarize, I have two not so ideal solutions for a seemingly simple problem.   

1. Utilize the Data islands StartDate and EndDate for getting the user daterange and store them in a variable and convert all of the formulae in all of the reports to complicated SetAnalysis formuale. (Phew!)

2. Ask the user to enter the DateRange twice within Qlik Sense! (i.e. once for the actual DateRange Field for filtering the records and secondly, for displaying the actual start and end date in the NPrinting Report). (But, user is not OK with this, and rightly so!)  

Any other alternatives which will allow the User to select the date range ONLY ONCE within Qlik Sense and still display the actual start and end date in NPrinting report (genrated via OnDemand) would be really appreciated!

Thank you!


Labels (2)
0 Replies