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
an example of variables as filters
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.
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.