Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi
do you have an idea, why my calendar in the productive enviroment is not loading correctly (it does not load any record) while in the development environment, same record, it works perfectly
There is even no error message, to see what is wrong, the end result is that i have no field values in my calendar
here is the code i use in both documents (development, productive)
LET varMinDate = Num(Peek('%CALENDAR__transactions__DATE',0,'transaction'));
LET varMaxDate = Num(Peek('%CALENDAR__transactions__DATE',-1,'transaction'));
LET varToday = num(Today());
CALENDAR_dummy:
LOAD date($(varMinDate)+IterNo()-1) as Datumsfeld
AUTOGENERATE 1 WHILE $(varMinDate)+IterNo()-1<= $(varMaxDate);
CALENDAR:
LOAD *,
AutoNumber(transaction_date_monthyear, 'PeriodID') as [Period ID];
LOAD Datumsfeld as %CALENDAR__transactions__DATE,
Datumsfeld as transaction_date,
week(Datumsfeld) as transaction_date_week,
year(Datumsfeld) as transaction_date_year,
month(Datumsfeld) as transaction_date_month,
weekday(Datumsfeld) as transaction_date_weekday,
date(monthstart(Datumsfeld), 'MMM-YYYY') as transaction_date_monthyear,
'Q' & ceil(month(Datumsfeld)/3) as transaction_date_quarter,
year(Datumsfeld)&'-' & week(Datumsfeld) as transaction_date_yearweek,
InYearToDate(Datumsfeld, $(varToday),0) * -1 as CurYTDFlag,
InYearToDate(Datumsfeld, $(varToday),-1) * -1 as LastYTDFlag
RESIDENT CALENDAR_dummy Order by Datumsfeld asc;
DROP TABLE CALENDAR_dummy;
Hi,
Here is the problem.
LOAD date(40992+IterNo()-1) as Datumsfeld
AUTOGENERATE 1 WHILE 40992+IterNo()-1<= 40517
As you can see the varibales are not getting proper values. Meaning your minimum variable is getting the Maximum value and Maximum value is getting Minimum value.
Kindly check that.
Regards,
Kaushik Solanki
Hi,
Make sure that your variables are not null.
You can check this by running script in debug mode or you can check the values from variable Overview after reloading the script.
Regards,
Kaushik Solanki
hi
thanks for your answer
i checked the variables, and they are not null. As said, the code for the calendar works perfectly in the development environment, but not in the productive one. There is even no error message and i get values of the
%CALENDAR__transactions__DATE (which is the key field) in the Transactions table. I though it may be a problem with the source field, but it seems it is fine.
Hi,
Script seems ok, there is no problem in script.
I would suggest you to run the script in debug mode and see whether this scipt is generating any data.
Regards,
Kaushik Solanki
the script is not generating data, i run the debugger
i ran the same script in the development enviroment, and it worked. somehow, the data is not being read in the calendar
Hi,
Is it possible for you to post qvw file and the base data?
Regards,
Kaushik Solanki
hi, it is not possible, but this is part of the log. seems like the condition was evaluated and it was zero. What i do not understand, is that the dates were ordered asc, and it works in my development document.
28.03.2013 18:43:47: 0693 IF 'Y' = 'Y' then
28.03.2013 18:43:47: 0695 LET varMinDate = Num(Peek('%CALENDAR__transactions__DATE',1,'transaction'))
28.03.2013 18:43:47: 0699 LET varMaxDate = Num(Peek('%CALENDAR__transactions__DATE',-1,'transaction'))
28.03.2013 18:43:47: 0701 LET varToday = num(Today())
28.03.2013 18:43:47: 0703 CALENDAR_dummy:
28.03.2013 18:43:47: 0704 LOAD date(40992+IterNo()-1) as Datumsfeld
28.03.2013 18:43:47: 0705 AUTOGENERATE 1 WHILE 40992+IterNo()-1<= 40517
28.03.2013 18:43:47: 1 Felder gefunden: Datumsfeld, 0 Sätze erhalten
28.03.2013 18:43:47: 0709 CALENDAR:
28.03.2013 18:43:47: 0710 LOAD *,
28.03.2013 18:43:47: 0711 AutoNumber(transaction_date_monthyear, 'PeriodID') as [Period ID]
28.03.2013 18:43:47: 0712 LOAD Datumsfeld as %CALENDAR__transactions__DATE,
28.03.2013 18:43:47: 0713 Datumsfeld as transaction_date,
28.03.2013 18:43:47: 0714 week(Datumsfeld) as transaction_date_week,
28.03.2013 18:43:47: 0715 year(Datumsfeld) as transaction_date_year,
28.03.2013 18:43:47: 0716 month(Datumsfeld) as transaction_date_month,
28.03.2013 18:43:47: 0717 weekday(Datumsfeld) as transaction_date_weekday,
28.03.2013 18:43:47: 0718 date(monthstart(Datumsfeld), 'MMM-YYYY') as transaction_date_monthyear,
28.03.2013 18:43:47: 0719 'Q' & ceil(month(Datumsfeld)/3) as transaction_date_quarter,
28.03.2013 18:43:47: 0720 year(Datumsfeld)&'-' & week(Datumsfeld) as transaction_date_yearweek,
28.03.2013 18:43:47: 0721 InYearToDate(Datumsfeld, 41361,0) * -1 as CurYTDFlag,
28.03.2013 18:43:47: 0722 InYearToDate(Datumsfeld, 41361,-1) * -1 as LastYTDFlag
28.03.2013 18:43:47: 0723 RESIDENT CALENDAR_dummy Order by Datumsfeld asc
28.03.2013 18:43:47: 12 Felder gefunden: %CALENDAR__transactions__DATE, transaction_date, transaction_date_week, transaction_date_year, transaction_date_month, transaction_date_weekday, transaction_date_monthyear, transaction_date_quarter, transaction_date_yearweek, CurYTDFlag, LastYTDFlag, Period ID, 0 Sätze erhalten
28.03.2013 18:43:47: 0725 DROP TABLE CALENDAR_dummy
28.03.2013 18:43:47: 0726 ENDIF
this is the log of my development document, compared with the productive one, the dates are different, but they come from the same source data. Why could this happen?
LOG DEVELOPMENT
LET varMinDate = Num(Peek('%CALENDAR__transactions__DATE',0,'transaction'))
28.03.2013 18:50:05: 0698 LET varMaxDate = Num(Peek('%CALENDAR__transactions__DATE',-1,'transaction'))
28.03.2013 18:50:05: 0700 LET varToday = num(Today())
28.03.2013 18:50:05: 0702 CALENDAR_dummy:
28.03.2013 18:50:05: 0703 LOAD date(39462+IterNo()-1) as Datumsfeld
28.03.2013 18:50:05: 0704 AUTOGENERATE 1 WHILE 39462+IterNo()-1<= 41356
28.03.2013 18:50:05: 1 Felder gefunden: Datumsfeld, 1.895 Sätze erhalten
LOG PRODUCTIVE
28.03.2013 18:43:47: 0703 CALENDAR_dummy:
28.03.2013 18:43:47: 0704 LOAD date(40992+IterNo()-1) as Datumsfeld
28.03.2013 18:43:47: 0705 AUTOGENERATE 1 WHILE 40992+IterNo()-1<= 40517
28.03.2013 18:43:47: 1 Felder gefunden: Datumsfeld, 0 Sätze erhalten
Hi,
Here is the problem.
LOAD date(40992+IterNo()-1) as Datumsfeld
AUTOGENERATE 1 WHILE 40992+IterNo()-1<= 40517
As you can see the varibales are not getting proper values. Meaning your minimum variable is getting the Maximum value and Maximum value is getting Minimum value.
Kindly check that.
Regards,
Kaushik Solanki
thanks,
even though i cannot understand why, since the data sources are the same for both documents