Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a QVW which will generate QVD on weekly basis.
now i need to change the master calendar to generate the QVD in Monthly basis. This is the master calendar we are using
LET tableloadStartTime=0;
SET vTotalRecordCount = 0;
Let NoOfDaysShift =0;
LET tableloadStartTime=Now(1);
if(WeekDay(today())<> 'Sat') and (WeekDay(today())<> 'Sun') Then
let NoOfDaysShift= num(WeekDay(today())*-1)-1;
ENDIF
IF (WeekDay(today())= 'Sun') Then
let NoOfDaysShift= -1;
ENDIF
let vExecDate = date(today()+$(NoOfDaysShift),'MM/DD/YYYY') ;
trace The date of execution is : $(vExecDate);
Let vToday = Today(1); // Custom Run
Let vToday_Num = num(floor(today(1)+$(NoOfDaysShift)));
According to this code QVD will generate on Every Sunday in a week.
Now i need to Change the code to load QVD on sunday in a Monthly once
EX: suppose if i run QVW on 29-4-2014 it generate the QVD based on 27-4-2014.
next if i change the let NoOfDaysShift= num(WeekDay(today())*-1)-1; code to
let NoOfDaysShift= num(WeekDay(today())*-1)+5; it will generate next sunday date which is 03-05-2014
same way i need to change the code . I need to generate the QVD on Monthly basis..
means if i run the QVW today it have to run Only first sunday of every month (i.e 6-4-2014). if i run the QVW tomarrow , also it has to run on 6-4-2014.
In the next month it have to run on 4-5-2014.
How to change the Master Calendar
you can use like this also
=Date(WeekEnd(Monthstart(AddMonths(Today(),1))),'MM/DD/YYYY') ---> for the next month
=Date(WeekEnd(Monthstart(AddMonths(Today(),-1))),'MM/DD/YYYY') ----> for the previous month
=Date(WeekEnd(Monthstart(AddMonths(Today(),0))),'MM/DD/YYYY') ----> for the current month
Hi Ravi ,
Thanks for the Reply.. Its Working Fine...Please add me as your friend ..
Sorry, I got your point now
try the below script
$(Include=../../../Include/WW/IntegratedReporting/IntegratedReportingGlobal.txt);
LET tableloadStartTime=0;
SET vTotalRecordCount = 0;
LET tableloadStartTime=Now(1);
LET vMonthShift =0;
LET vExecDate = Date(WeekEnd(Monthstart(AddMonths(Today(),$(vMonthShift)))),'MM/DD/YYYY');
TRACE The date of execution is : $(vExecDate);
LET vToday = Today(1); // Custom Run
LET vToday_Num = num(floor(vExecDate));
Hi Ravi,
Thanks for accepting me as friend,
I need one more help.
As per the First QVW which i have attached..
I need to run the QVW in Every sunday in a month ,
after the month end i need to show all the 4 or 5 weeks QVD data whcih is append to every week
if i run the QVW in any day in a month it has to generate the QVD.
Ex: if i run today it will load the QVD based on previous week sunday(i.e 26-4-2014)
like that after month end we need to show all the weekly data in month ..
How can we do this...