Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am using NPrinting and have a date field I use in the QVW called FISCAL_MONTH_YEAR which is formatted like 03/2015. I need to get my NPrinting report running for the current month but using =month(now()) & =year(now()) don't achieve what I need because my date fields are called FISCAL_MONTH and FISCAL_YEAR. How can I get the report to run for the current month/year?
TIA
Hi Cassandra,
No worries, I do this all the time. You need to create a FIELD-BASED FILTER in your nPrinting report.
So, create a new filter, use the connection to your QVW, and select the field FISCAL_MONTH. Then, in the "Value"
field of the filter creation dialogue, enter =Month(today(0)), and check the two boxes "IsNumeric" and "Evaluate".
Same thing for Year, but obviously use the different field and function Year(today(0)).
Note, I use "today(0)" because it evaluates once at run time, unlike now(), which I believe updates every second.
Hope this helps,
Kevin
Hi Cassandra,
No worries, I do this all the time. You need to create a FIELD-BASED FILTER in your nPrinting report.
So, create a new filter, use the connection to your QVW, and select the field FISCAL_MONTH. Then, in the "Value"
field of the filter creation dialogue, enter =Month(today(0)), and check the two boxes "IsNumeric" and "Evaluate".
Same thing for Year, but obviously use the different field and function Year(today(0)).
Note, I use "today(0)" because it evaluates once at run time, unlike now(), which I believe updates every second.
Hope this helps,
Kevin
Kevin,
My FISCAL_MONTH and FISCAL_YEAR fields are not numeric. They are stored as varchar (APR and FY15). On the other hand, FISCAL_MONTH_YEAR is stored as date- 2015/04.
Is my only option to use a new field to store these numerically? I have a (FISCAL_YEAR_NUM - 2015) but I don't have a numeric FISCAL_MONTH field.
Thanks,
Cassandra
Hi Cassandra,
I'm sure the smart people will have a better answer, but I would use the MakeDate function to create a QV style date field. If your format is ALWAYS "YYYY/MM" (not YYYY/M ~ 2015/1 for January), you could use:
MakeDate(left(FiscalMonthYear,4),right(FiscalMonthYear,2)) As QVFDate
for 2015/04, for example, you would get a date stamp of 2015-04-01 00:00:00
You can then use the standard QV date functions as I suggested earlier.
Hope this help!
Kevin