Private Sub SearchColumns()
    Dim oRS As ADODB.Recordset
    Dim fld As Field
    Dim oRead As New CCustomReportRead
    Dim nIndex As Integer
    Dim sName As String
        
    nIndex = 1
    Set oRS = oRead.GetBlocksList("1=2")
    If oRS Is Nothing Then
        Alert "Database Error!"
        PutToLog "Failed While Get Block List", "frmSheet"
        Exit Sub
    End If
    With grd
        For Each fld In oRS.Fields
            sName = Trim(fld.Name)
            If sName <> "" Then
                .Cols = grd.Cols + 1
                .TextMatrix(0, nIndex) = sName
                .ColWidth(nIndex) = Len(sName) * 150 + 240
                nIndex = nIndex + 1
            End If
        Next
        .Cols = .Cols - 1
        .ColWidth(0) = 0
    End With
    
    Set oRS = Nothing
    Set oRead = Nothing
    Set fld = Nothing
End Sub