search cancel

"Managed Computers with Symantec System Recovery" report is not showing any data from December

book

Article ID: 162713

calendar_today

Updated On:

Products

IT Management Suite

Issue/Introduction

Customer noticed that his "Managed Computers with Symantec System Recovery" report doesn't show anything from December. The data is populated in the database (uncer Inv_BESR_Image table) but the report seesm to be skipping anything from December.

Product Version:
SMP 7.5 SP1 HF5
SSR 2011
 

Cause

There was a bad logic in the fnGetMonth function used for this report. It was converting any entry in this format 2015-12-xx to some other month.

Resolution

An updated function was provided to the customer. It will parse the proper date and return the correct format.

Please update fnGetMonth with the following one:

ALTER FUNCTION fnGetMonth(@ExpirationDate datetime,@culture nvarchar(20),@style int ,@length int)
        RETURNS NVARCHAR(50)
        AS
        BEGIN

        DECLARE @months NVARCHAR(250)
        DECLARE @langMonth NVARCHAR(20)

        --SELECT @months=shortmonths FROM sys.syslanguages AS lang
        --JOIN Culture cltr ON lang.lcid=cltr.LCID AND cltr.Culture LIKE '%' + @culture + '%'
        --SELECT @langMonth=dbo.fnSplitFunctionIndex(@months,MONTH(@ExpirationDate))

        RETURN  SUBSTRING (DATENAME (MONTH, @ExpirationDate),1, 3)+ ' ' + CAST(DAY(@ExpirationDate) as VARCHAR(2)) + ' ' + CAST(YEAR(@ExpirationDate) AS VARCHAR(4)) + ' ' + LTRIM(RIGHT(CONVERT(NVARCHAR(20), @ExpirationDate, @style), @length))
   END