Relative Dates for Anonymous Blocks

Document created by cdnadmin on Jan 24, 2014
Version 1Show Document
  • View in full screen mode
This document was generated from CDN thread

Created by: Ramprasad Rathod on 28-07-2011 03:06:24 PM
HI All,
 
I have copied most of the anonymous blocks from webview and Created report defentions on the CUIC and dont see any option to select the relative dates range.
 
So i have created a value list as Relative dates. Now i get the option of relative date range when i run a report . But I am unable to select either of the options... I m unable to select only relative date range and run the report... It is asking to select even dates...
 
Do you know where am i doing wrong. 
 
Or .. Please let me know the right procedure to use the Relative dates for Anonymous Blocks
 
Thanks
Ram

Subject: RE: Relative Dates for Anonymous Blocks
Replied by: Luis Yrigoyen on 12-09-2011 10:54:37 PM
Did you figure it out? Can you post how you did the value list for the relative dates?

Thanks

Subject: RE: Relative Dates for Anonymous Blocks
Replied by: Avinash Bhagwan on 26-09-2011 05:25:45 PM
The way you use the Relative Dates is you create the value list with Collections of the Relative Dates.
Then you associate this value list in your query.
The key is if you use relative dates and fixed dates which is what i tend to use then you need to go to the parameters tab in your Report definition and uncheck the required option and select the option to pass null values for empty strings. you need to do this for your fixed dates components i.e start and end date as well as relative dates.

Then it should work.

I have done quite a few reports and gotten relative dates in pretty much all the reports functional.

Regards
Avinash


Note: If you have imported a report then you still need to go to the parameters and set the values for empty strings and required check boxes.

Subject: RE: Relative Dates for Anonymous Blocks
Replied by: Luis Yrigoyen on 26-09-2011 06:14:38 PM
could you post a couple of sample rows from your relative dates table?
I get the part about the value list but how would the table look like?  what columns, etc.

thanks

Subject: RE: New Message from Avinash Bhagwan in Contact Center Reporting (CCR) - Co
Replied by: Ramprasad Rathod on 27-09-2011 06:04:00 AM
Hi Avinash

Could you please send me a sample report defention with relative dates for Perskg26

I tried ur steps.. dot get the results when I run with this option

Thanks
Ram

From: Cisco Developer Community Forums [mailto:cdicuser@developer.cisco.com]
Sent: Tuesday, September 27, 2011 2:56 AM
To: cdicuser@developer.cisco.com
Subject: New Message from Avinash Bhagwan in Contact Center Reporting (CCR) - Contact Center Reporting: RE: Relative Dates for Anonymous Blocks

Avinash Bhagwan has created a new message in the forum "Contact Center Reporting":

--------------------------------------------------------------
The way you use the Relative Dates is you create the value list with Collections of the Relative Dates.
Then you associate this value list in your query.
The key is if you use relative dates and fixed dates which is what i tend to use then you need to go to the parameters tab in your Report definition and uncheck the required option and select the option to pass null values for empty strings. you need to do this for your fixed dates components i.e start and end date as well as relative dates.

Then it should work.

I have done quite a few reports and gotten relative dates in pretty much all the reports functional.

Regards
Avinash


Note: If you have imported a report then you still need to go to the parameters and set the values for empty strings and required check boxes.
--
To respond to this post, please click the following link:

<http://developer.cisco.com/web/ccr/forums/-/message_boards/view_message/4537788>

or simply reply to this email.

Subject: RE: New Message from Ramprasad Rathod in Contact Center Reporting (CCR) - C
Replied by: Avinash Bhagwan on 27-09-2011 09:43:00 AM
I have attached a report that you can import and check the relative  dates.
Note that once you import the report you need to add the collections to relativedates value list with this month,this year etc.

Then go to the parameters and uncheck required in date time field.
And allow null values.
Note that Relative dates is a Decimal field.

Regards

Avinash Bhagwan
Contact Center Engineer
CDW
120 S Riverside Plaza Floor 9 | Chicago, IL 60606
Mobile: 847.271.9661
Email:  avinash.bhagwan@cdw.com<mailto:scott.thomas@cdw.com>

[https://webmail.ogilvypr.com/exchange/Macy.Boehm/Inbox/Fw:%20CDW%20Sig.EML/1_multipart_xF8FF_2_CDW-Email-Sig.png/C58EA28C-18C0-4a97-9AF2-036E93DDAFB3/CDW-Email-Sig.png?attach=1]

From: Cisco Developer Community Forums [mailto:cdicuser@developer.cisco.com]
Sent: Tuesday, September 27, 2011 5:04 AM
To: cdicuser@developer.cisco.com
Subject: New Message from Ramprasad Rathod in Contact Center Reporting (CCR) - Contact Center Reporting: RE: New Message from Avinash Bhagwan in Contact Center Reporting (CCR) - Co

Ramprasad Rathod has created a new message in the forum "Contact Center Reporting":

--------------------------------------------------------------
Hi Avinash

Could you please send me a sample report defention with relative dates for Perskg26

I tried ur steps.. dot get the results when I run with this option

Thanks
Ram

From: Cisco Developer Community Forums [mailto:cdicuser@developer.cisco.com]
Sent: Tuesday, September 27, 2011 2:56 AM
To: cdicuser@developer.cisco.com
Subject: New Message from Avinash Bhagwan in Contact Center Reporting (CCR) - Contact Center Reporting: RE: Relative Dates for Anonymous Blocks

Avinash Bhagwan has created a new message in the forum "Contact Center Reporting":

--------------------------------------------------------------
The way you use the Relative Dates is you create the value list with Collections of the Relative Dates.
Then you associate this value list in your query.
The key is if you use relative dates and fixed dates which is what i tend to use then you need to go to the parameters tab in your Report definition and uncheck the required option and select the option to pass null values for empty strings. you need to do this for your fixed dates components i.e start and end date as well as relative dates.

Then it should work.

I have done quite a few reports and gotten relative dates in pretty much all the reports functional.

Regards
Avinash


Note: If you have imported a report then you still need to go to the parameters and set the values for empty strings and required check boxes.
--
To respond to this post, please click the following link:

<http://developer.cisco.com/web/ccr/forums/-/message_boards/view_message/4537788>

or simply reply to this email.
--
To respond to this post, please click the following link:

<http://developer.cisco.com/web/ccr/forums/-/message_boards/view_message/4540752>

or simply reply to this email.

Subject: RE: Relative Dates for Anonymous Blocks
Replied by: Luis Yrigoyen on 27-09-2011 02:36:11 PM
Thank you very much.  I see how it is done.


thanks again

Subject: RE: Relative Dates for Anonymous Blocks
Replied by: Nathan Luk on 15-12-2011 02:33:03 AM
Hi Ram,

I've tried setting this up and when I run the query against the AWDB directly and substitute some values in for :start, :end and :relativedate it all works fine. I've checked the values in the value list for my 'Dates' value list and they look ok as well but when I try to run the report, I select the relevant parameters then click run and I just that errors on webpage icon on the bottom left of Internet Explorer which when I expand out says:

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C; .NET4.0E)
Timestamp: Thu, 15 Dec 2011 07:31:29 UTC


Message: 'dojo.byId(...).value' is null or not an object
Line: 42
Char: 2
Code: 0
URI: http://10.53.109.141:8081/cuic/scripts/ReportFilter.js


Any thoughts?

Cheers,
Nathan

Subject: RE: Relative Dates for Anonymous Blocks
Replied by: Nathan Luk on 15-12-2011 07:25:53 PM
Hi Avinash,

Thanks for that. I actually had the start and end parameters set as DATE instead of DATETIME which was causing an issue so after changing that it started working.

Thanks again for that, great idea using a value list for relative dates!

Cheers,
Nathan

Subject: RE: Relative Dates for Anonymous Blocks
Replied by: Avinash Bhagwan on 15-12-2011 08:54:54 AM
The issue is the vaue list you are referencing for date or other object has a NULL object.
For relative dates in your parameters you need to allow for NULL parameters to be passed for start,end and relative dates.
All the above should have unchecked box for Required.

Can you upload the report you are running for me to look at it and run in test system to point out the issue.

However, on face of it is a issue with NULL value being passed into the query as input.

Subject: RE: Relative Dates for Anonymous Blocks
Replied by: Amer rajai Sha'er on 13-07-2012 04:08:14 PM
Hello All.
 
Maybe this thread goes a way back long
but i figure out how to migrate the webview reports to Database query
(not anonymus block) so that we can use the historical dates.
1-
As everyone almost posted , we have to copy the query from the srd files
that is available in the custom folder on the webview server, paste the
query into a notepad , seach for a value 112 (it is always beside the 
datetime value) changed it to 101
2- delete everything is relative
to the parameters (usually comes in the where like this  (
ASGHH.DateTime >= :start_datetime) )
3- also delete anything that has the : value
after
you validate you can then have the historical values updated from the
properties tab to have the dates as it is in the webview.
 
of
course don't forget to add the values relevant (calltypes , agent team ,
etc..) as a value list so that they can appear in the run of the
script.
 
Hopes this helps.
 
Amer
 

Subject: RE: Relative Dates for Anonymous Blocks
Replied by: VARUN Gaur on 13-02-2013 06:03:52 AM
I've designed to Select Date Range thru query, In below mention query you can select 'M' for Monthly, 'W' for weekly, 'D' for Daily and 'C' for Custom Date Range.
In report filtering criteria you will have First criteria is Enter (M or D or W or C). If you select M or D or W then you dont need to set start date and end date. but if you select C .i.e Custom Date Range then you need to select start date and end date.
Make sure Start Date and End date should not be checked as Required check box in Report Definition ---> parameter Tab.
 
BEGIN 
 
DECLARE 
@dtStartDateTime DATETIME, 
@dtEndDateTime DATETIME, 
@sDateRange AS CHAR(1) 
 
 
SET @sDateRange = :daterange 
 
DECLARE @TodaysDate DATETIME 
SET @TodaysDate = GETDATE() 
 
IF @sDateRange = 'D' --DAILY 
BEGIN 
SET @dtStartDateTime = CONVERT(DATETIME, CONVERT(VARCHAR(10),@TodaysDate, 101)) 
SET @dtEndDateTime = CONVERT(DATETIME, CONVERT(VARCHAR(10),@TodaysDate + 1, 101)) 
END 
 
ELSE IF @sDateRange = 'M' -- MONTHLY 
BEGIN 
SET @dtStartDateTime = CONVERT(DATETIME, CONVERT(VARCHAR(2), DATEPART(MM,@TodaysDate)) + '/1/' + CONVERT(VARCHAR(4), DATEPART(YY,@TodaysDate))) 
SET @dtEndDateTime = CONVERT(DATETIME, CONVERT(VARCHAR(10),@TodaysDate + 1, 101)) 
END 
 
ELSE IF @sDateRange = 'C' -- CUSTOM DATE RANGE 
BEGIN 
SET @dtStartDateTime =  :startdate
SET @dtEndDateTime = :enddate  
END 
 
ELSE -- WEEKLY (IF User specified anyother value than these 4 than also Weekly will execute.) 
 
BEGIN 
SET @dtStartDateTime = DATEADD(D, -1 * ((CASE (DATEPART(DW, @TodaysDate) - 2) WHEN -1 THEN 6 ELSE (DATEPART(DW, @TodaysDate) - 2) END)), @TodaysDate) 
SET @dtEndDateTime = CONVERT(DATETIME, CONVERT(VARCHAR(10),@TodaysDate + 1, 101)) 
END 
SELECT * FROM Termination_Call_Detail
Where DateTime BETWEEN @dtStartDateTime AND @dtEndDateTime
END

Subject: RE: Relative Dates for Anonymous Blocks
Replied by: VARUN Gaur on 20-03-2013 12:22:04 AM
Ramprasad Rathod:
HI All,   I have copied most of the anonymous blocks from webview and Created report defentions on the CUIC and dont see any option to select the relative dates range.   So i have created a value list as Relative dates. Now i get the option of relative date range when i run a report . But I am unable to select either of the options... I m unable to select only relative date range and run the report... It is asking to select even dates...   Do you know where am i doing wrong.    Or .. Please let me know the right procedure to use the Relative dates for Anonymous Blocks   Thanks Ram

 
Hi I found on Cisco Forum. I might solve your problem.

Subject: RE: Relative Dates for Anonymous Blocks
Replied by: VARUN Gaur on 20-03-2013 12:24:16 AM
Ramprasad Rathod:
HI All,   I have copied most of the anonymous blocks from webview and Created report defentions on the CUIC and dont see any option to select the relative dates range.   So i have created a value list as Relative dates. Now i get the option of relative date range when i run a report . But I am unable to select either of the options... I m unable to select only relative date range and run the report... It is asking to select even dates...   Do you know where am i doing wrong.    Or .. Please let me know the right procedure to use the Relative dates for Anonymous Blocks   Thanks Ram

Hi, I found this file on Cisco Forum. It might solve your problem.

Subject: RE: Relative Dates for Anonymous Blocks
Replied by: Muhammad Hammad Saleem on 04-04-2013 08:02:59 PM
Hi Avinash Bhagwan,


As per your post above you mentioned that create a value lise and associate that in your report definition. I already have a value list for relative dates and it has collection in it as well. How can I use this value list in my report definition. I am confused. Can you please help ?
Regards,

Hammad

 

Outcomes