This worked, thank you!!!
Original Message:
Sent: 12/13/2021 1:58:00 PM
From: IAN HENDERSON
Subject: RE: Built in Calendars - Modifications
The expression for the current week filter which Henk pasted inadvertently has a wee typo. Use this expression for the current week filter.
// This is a template expression that is used by the column property 'Lookup reference'.
// To pass validation, the line below must remain as a comment. Do not remove the forward slashes.
// validate: 1 = 1
#$_this.parent.idForExpression# >=
#_add_days(queryValue($_this.parent.split.ref + '.dWeek',
$_this.parent.split.ref + '.TheDate = ' + _add_days($_as_of_date,1)),-1)#
AND
#$_this.parent.idForExpression# <
#_add_days(queryValue($_this.parent.split.ref + '.dWeek',
$_this.parent.split.ref + '.TheDate = ' +
queryValue($_this.parent.split.ref + '.NW_TheDate',
$_this.parent.split.ref + '.TheDate = ' + _add_days($_as_of_date,1))),-1
)#
Here is the difference.
I used the expression editor's parenthesis matching functionality to find the matching pairs of parentheses and discovered that the closing parenthesis for the second queryValue function was in the wrong place.
Once I fixed that the current week filter expression the XQE error will go away and the expected SQL is generated.
------------------------------
IAN HENDERSON
------------------------------
Original Message:
Sent: Wed December 08, 2021 02:03 PM
From: Razorbx13
Subject: Built in Calendars - Modifications
Sorry, I thought I did include it. The prior week works fine. The current week change based on the above recommendation gave me this. Thanks for your help.
XQE-CON-0007 XQE error encountered: Macro function '_add_days' has 1 arguments, but requires 2.
Text to expand:
// This is a template expression that is used by the column property 'Lookup reference'.
// To pass validation, the line below must remain as a comment. Do not remove the forward slashes.
// validate: 1 = 1
#$_this.parent.idForExpression# >= #_add_days(queryValue($_this.parent.split.ref + '.dWeek', $_this.parent.split.ref + '.TheDate = ' + _add_days($_as_of_date,1)),-1)#
AND
#$_this.parent.idForExpression# < #_add_days(queryValue($_this.parent.split.ref + '.dWeek', $_this.parent.split.ref + '.TheDate = ' + queryValue($_this.parent.split.ref + '.NW_TheDate', $_this.parent.split.ref + '.TheDate = ' + _add_days($_as_of_date,1)),-1) )#
RSV-SRV-0042 Trace back:
RSReportService.cpp(786): XQEException: CCL_CAUGHT: RSReportService::processImpl()
RSReportServiceMethod.cpp(260): XQEException: CCL_RETHROW: RSReportServiceMethod::process(): asynchRunSpecification_Request
------------------------------
Razorbx13
Original Message:
Sent: Wed December 08, 2021 01:34 PM
From: IAN HENDERSON
Subject: Built in Calendars - Modifications
It's usually helpful to include the text of an error message so people can have a better idea about what has happened.
I'm assuming that it is something like this:
XQE-MSR-0026 'Prior_YTD' cannot be applied because its parent does not have lookup reference definition.
In this case the message is saying that the Prior YTD relative time filter can't be applied to its parent object, which normally would be a measure, which would normally create a relative time measure. Because the filter is in a folder, the parent of the relative time filter is the folder. This is wrong as the folder (or set of nested folders) should not affect things as folders are not namespaces.
In addition to that bug, the error message has a grammar error. It should say '...have a lookup...'
------------------------------
IAN HENDERSON
Original Message:
Sent: Mon December 06, 2021 10:57 AM
From: Philipp Hornung
Subject: Built in Calendars - Modifications
Hi @HENK CAZEMIER, Thank you for sharing your advanced insights. We already modified the calender module to fit our business needs. So we added a lot of filters and tried to sort them into folders to avoid a single big list. Unfortunately all of our attempts ended in some error message. If you know a way how to put the filters into (sub-)folders please let me know. Best regards, Philipp
------------------------------
Philipp Hornung
Original Message:
Sent: Fri December 03, 2021 03:30 PM
From: HENK CAZEMIER
Subject: Built in Calendars - Modifications
Hi,
The Calendars are included in the install as Data modules. You can edit these definitions to suit your needs. Steps:
1 - navigate to Team content->Calendars and open Gregorian Calendar
2 - modify the Current Week and Prior Week definitions. (see below for the updated definitions).
3 - Save as -> Gregorian Calendar Sunday=1
4 - Edit a Data Module that is already integrated with Calendars
5 - On the sources tab, select Gregorian Calendar and from the context menu select Relink..
6- Select the Calendar Data module saved in step 3
Prior Week change the expression to:
// This is a template expression that is used by the column property 'Lookup reference'.// To pass validation, the line below must remain as a comment. Do not remove the forward slashes.// validate: 1 = 1#$_this.parent.idForExpression# >= #_add_days(queryValue($_this.parent.split.ref + '.dWeek', $_this.parent.split.ref + '.TheDate = ' + queryValue($_this.parent.split.ref + '.PW_TheDate', $_this.parent.split.ref + '.TheDate = ' + _add_days($_as_of_date,1)) ),-1)#AND#$_this.parent.idForExpression# < #_add_days(queryValue($_this.parent.split.ref + '.dWeek', $_this.parent.split.ref + '.TheDate = ' + _add_days($_as_of_date,1)),-1)#
Current Week change the expression to:
// This is a template expression that is used by the column property 'Lookup reference'.// To pass validation, the line below must remain as a comment. Do not remove the forward slashes.// validate: 1 = 1#$_this.parent.idForExpression# >= #_add_days(queryValue($_this.parent.split.ref + '.dWeek', $_this.parent.split.ref + '.TheDate = ' + _add_days($_as_of_date,1)),-1)#AND#$_this.parent.idForExpression# < #_add_days(queryValue($_this.parent.split.ref + '.dWeek', $_this.parent.split.ref + '.TheDate = ' + queryValue($_this.parent.split.ref + '.NW_TheDate', $_this.parent.split.ref + '.TheDate = ' + _add_days($_as_of_date,1)),-1))#
I tested these modifications and I think I got them right. In essence the reference date, $_as_of_date is shifted forward by 1 day, then the range that is computed is shifted back by 1 day. Both operations use the _add_days macro function.
I hope this helps.
------------------------------
Kind regards,
HENK CAZEMIER
Original Message:
Sent: Fri December 03, 2021 09:15 AM
From: Razorbx13
Subject: Built in Calendars - Modifications
Hi all, I have a question on the built in calendars for Gregorian and Fiscal. My client would like the week to be Sun to Sat instead of Mon - Sun. Is there a way to modify these calendars easily to do this? The only changes would be to the WEEK fields I believe.
Thanks!
------------------------------
Razorbx13
------------------------------
#CognosAnalyticswithWatson