def METHOD_NAME(self, Filename='Report.csv'):
    try:
        File = open(Filename, 'w+')
        File.write("""No, Error Code, Error Message, File, LineNo, Other Error Message\n""")
        RecordSet = self.Query()
        Index = 0
        for Record in RecordSet:
            Index = Index + 1
            ErrorID = Record[1]
            OtherMsg = Record[2]
            BelongsToTable = Record[3]
            BelongsToItem = Record[4]
            IsCorrected = Record[5]
            SqlCommand = ''
            if BelongsToTable == 'File':
                SqlCommand = """select 1, FullPath from %s where ID = %s
                         """ % (BelongsToTable, BelongsToItem)
            else:
                SqlCommand = """select A.StartLine, B.FullPath from %s as A, File as B
                                where A.ID = %s and B.ID = A.BelongsToFile
                             """ % (BelongsToTable, BelongsToItem)
            NewRecord = self.Exec(SqlCommand)
            if NewRecord != []:
                File.write("""%s,%s,"%s",%s,%s,"%s"\n""" % (Index, ErrorID, EccToolError.gEccErrorMessage[ErrorID], NewRecord[0][1], NewRecord[0][0], OtherMsg))
                EdkLogger.quiet("%s(%s): [%s]%s %s" % (NewRecord[0][1], NewRecord[0][0], ErrorID, EccToolError.gEccErrorMessage[ErrorID], OtherMsg))
        File.close()
    except IOError:
        NewFilename = 'Report_' + time.strftime("%Y%m%d_%H%M%S.csv", time.localtime())
        EdkLogger.warn("ECC", "The report file %s is locked by other progress, use %s instead!" % (Filename, NewFilename))
        self.METHOD_NAME(NewFilename)