Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
While i am developing calendar it shows following error. my script is as follows.
Script line error :
LOAD
Date( + RangeSum(Peek('RowNum'), 1) - 1) AS Day,
RangeSum(Peek('RowNum'), 1) AS RowNum
AutoGenerate vEndDate - vStartDate + 1
Calendar Script is :
SET vFiscalYearStartMonth = 4;
DateRange:
LOAD
Date(Min(Day)) AS MinDate,
Date(Max(Day)) AS MaxDate
Resident Orderdetails;
LET vStartDate = Date(Peek(MinDate));
LET vEndDate = Date(Peek(MaxDate));
DROP TABLE DateRange;
FiscalCalendar:
LOAD
*,
Dual('Q' & Ceil(FiscalMonth/3), Ceil(FiscalMonth/3)) AS FiscalQuarter, // Fiscal Calendar Quarter
Dual(Text(Date(MonthEnd(Date), 'MMM')), FiscalMonth) AS FiscalMonthName; // Fiscal Calendar Month Name
LOAD
*,
Year(Day) AS Year, // Standard Calendar Year
Month(Day) AS Month, // Standard Calendar Month
Date(MonthEnd(Day), 'MMM') AS MonthName, // Standard Calendar Month Name
Dual('Q' & Ceil(Month(Day)/3), Ceil(Month(Day)/3)) AS Quarter, // Standard Calendar Quarter
Mod(Month(Day) - $(vFiscalYearStartMonth), 12)+1 AS FiscalMonth, // Fiscal Calendar Month
YearName(Day, 0, $(vFiscalYearStartMonth)) AS FiscalYear; // Fiscal Calendar Year
LOAD
Date($(vStartDate) + RangeSum(Peek('RowNum'), 1) - 1) AS Day,
RangeSum(Peek('RowNum'), 1) AS RowNum
AutoGenerate vEndDate - vStartDate + 1;
Have you tried:
AUTOGENERATE num($(vEndDate)) - num($(vStartDate)) + 1;
you are having issue in startdate and enddate variable they are showing null value please check format.
Have you try:
AUTOGENERATE (1)
WHILE $(vEndDate)+IterNo()-1<= $(vStartDate);
It looks like the variables are not getting defined. Check the log to ensure that the DateRange table retuned 1 row. Silly question, perhaps, but is the DateRange LOAD before or after you load Orderdetails?
And the above post is correct. You need $() expansions in the AutoGenerate line as well.
I tried your solution but however there is no data showing in month,year,quarter list box ? Script reload successfully but it does not showing data ?