Announcement

Collapse
No announcement yet.

Fix Hyena Reporting Database

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Fix Hyena Reporting Database

    All of a sudden this morning I am having a problem with the Hyena Reporting. I constantly use this feature and I have had no problems, but suddenly I do. The scenario below I do several times a week, but today it is not working

    I am trying to run a report from Hyena and I am trying to create a New table for the information. Microsoft Access Opens, then I get the error:

    Run-time error '2103'


    The report name 'CurrentUsers' you entered in either the property sheet or macro is misspelled or refers to a report that doesn't exist.

    The macro/module halts and the new table is not created. If the table exists, the report runs fine. Nothing was changed in the database but I do not know what is causing this.

    Any advice?

    Thank you

    Melissa

    P.S.

    My modReports Module looks like this:

    Option Compare Database
    Option Explicit

    Function RunReport()

    Dim Cmd, File, Report, Spec As String
    Dim Position, Position2 As Integer

    ' Check value returned by Command function.
    Cmd = Command
    If Len(Cmd) = 0 Then
    MsgBox ("No command line specified; unable to run report")
    Exit Function
    End If

    ' find the name of the import file...
    Position = InStr(Cmd, "/IMPORT=")
    ' add 8 to position for length of "/IMPORT="
    Position = Position + 8
    Position2 = InStr(Position, Cmd, ";")
    File = Mid(Cmd, Position, Position2 - Position)

    ' now find the name of the report to run...
    Position = InStr(Cmd, "/REPORT=")
    ' add 8 to position for length of "/REPORT="
    Position = Position + 8
    Position2 = InStr(Position, Cmd, ";")
    Report = Mid(Cmd, Position, Position2 - Position)

    ' now find the name of the specification to run...
    Position = InStr(Cmd, "/SPEC=")
    ' add 6 to position for length of "/SPEC="
    Position = Position + 6
    Position2 = InStr(Position, Cmd, ";")
    Spec = Mid(Cmd, Position, Position2 - Position)
    If Spec = "" Then
    Spec = Report
    End If

    ' now find the option to delete/append the existing file...
    Position = InStr(Cmd, "/NOAPPEND;")
    If Position > 0 Then
    DoCmd.SetWarnings False
    If Spec = "SERVICES" Then
    DoCmd.OpenQuery "DeleteAllServices", acViewNormal, acEdit
    End If
    If Spec = "ACCESS" Then
    DoCmd.OpenQuery "DeleteAllAccess", acViewNormal, acEdit
    End If
    If Spec = "COMPUTERS" Then
    DoCmd.OpenQuery "DeleteAllComputers", acViewNormal, acEdit
    End If
    If Spec = "CONNECTIONS" Then
    DoCmd.OpenQuery "DeleteAllConnections", acViewNormal, acEdit
    End If
    If Spec = "DRIVESPACE" Then
    DoCmd.OpenQuery "DeleteAllDriveSpace", acViewNormal, acEdit
    End If
    If Spec = "EVENTS" Then
    DoCmd.OpenQuery "DeleteAllEvents", acViewNormal, acEdit
    End If
    If Spec = "FILES" Then
    DoCmd.OpenQuery "DeleteAllFiles", acViewNormal, acEdit
    End If
    If Spec = "GROUPMEMBERS" Then
    DoCmd.OpenQuery "DeleteAllGroupMembers", acViewNormal, acEdit
    End If
    If Spec = "GROUPS" Then
    DoCmd.OpenQuery "DeleteAllGroups", acViewNormal, acEdit
    End If
    If Spec = "OPENFILES" Then
    DoCmd.OpenQuery "DeleteAllOpenFiles", acViewNormal, acEdit
    End If
    If Spec = "OBJECTMGR" Then
    DoCmd.OpenQuery "DeleteAllObjectMgr", acViewNormal, acEdit
    End If

    If Spec = "PRINTERS" Then
    DoCmd.OpenQuery "DeleteAllPrinters", acViewNormal, acEdit
    End If
    If Spec = "PRINTJOBS" Then
    DoCmd.OpenQuery "DeleteAllPrintJobs", acViewNormal, acEdit
    End If
    If Spec = "PROCESSES" Then
    DoCmd.OpenQuery "DeleteAllProcesses", acViewNormal, acEdit
    End If
    If Spec = "SCHEDJOBS" Then
    DoCmd.OpenQuery "DeleteAllSchedJobs", acViewNormal, acEdit
    End If
    If Spec = "SESSIONS" Then
    DoCmd.OpenQuery "DeleteAllSessions", acViewNormal, acEdit
    End If
    If Spec = "SHARES" Then
    DoCmd.OpenQuery "DeleteAllShares", acViewNormal, acEdit
    End If
    If Spec = "USERDETAILS" Then
    DoCmd.OpenQuery "DeleteAllUserDetails", acViewNormal, acEdit
    End If
    If Spec = "USERS" Then
    DoCmd.OpenQuery "DeleteAllUsers", acViewNormal, acEdit
    End If
    If Spec = "ADOBJECTLIST" Then
    DoCmd.OpenQuery "DeleteAllADObjectList", acViewNormal, acEdit
    End If
    End If
    DoCmd.TransferText acImportDelim, Spec, Spec, File, True
    Cmd = "CMD.EXE /x /c DEL " + File
    Shell (Cmd)
    If (Len(Report) > 0) Then
    DoCmd.OpenReport Report, acViewPreview
    Else
    Quit
    End If

    End Function

    Function RunAdReport()
    Dim Cmd, File, Report, Spec As String
    Dim Position, Position2 As Integer

    ' Check value returned by Command function.
    Cmd = Command
    If Len(Cmd) = 0 Then
    MsgBox ("No command line specified; unable to run report")
    Exit Function
    End If

    ' find the name of the import file...
    Position = InStr(Cmd, "/IMPORT=")
    ' add 8 to position for length of "/IMPORT="
    Position = Position + 8
    Position2 = InStr(Position, Cmd, ";")
    File = Mid(Cmd, Position, Position2 - Position)

    ' now find the name of the report to run...
    Position = InStr(Cmd, "/TABLE=")
    ' add 8 to position for length of "/TABLE="
    Position = Position + 7
    Position2 = InStr(Position, Cmd, ";")
    Report = Mid(Cmd, Position, Position2 - Position)

    ' now find the option to delete/append the existing file...
    Position = InStr(Cmd, "/NOAPPEND;")
    If Position > 0 Then
    On Error Resume Next
    DoCmd.DeleteObject acTable, Report
    End If

    DoCmd.TransferText acImportDelim, , Report, File, True
    Cmd = "CMD.EXE /x /c DEL " + File
    Shell (Cmd)
    If (Len(Report) > 0) Then
    DoCmd.OpenTable Report
    Else
    Quit
    End If

    End Function

  • #2
    Re: Fix Hyena Reporting Database

    When you select Generate Report, is Hyena filling in a Table name for you? If so, leave it the way it is and see if it will work.

    Comment


    • #3
      Re: Fix Hyena Reporting Database

      If the table exists, the function works. If the table does not yet exists, the function fails.

      Again, I have been doing this all week in the same manner and it only started having problems today.

      I have reinstalled Hyena, even worked with an old backup copy of the original Hyenarpt.mdb and the problem still fails. Is there some sort of temp file or temp location that is not getting properly populated. What happens between the time I click Generate Report and Microsoft Access Opening?

      This is very frustrating

      Comment


      • #4
        Re: Fix Hyena Reporting Database

        When you are reporting data from a Windows (NT) domain for users, groups, etc., you need to enter the name of a report/table that exists. If you are reporting AD data, the table is created for you.

        If think that if you copy an existing table/report in Access you can rename it and then use that name when generating the report. But this only applies for NT data for users, groups, etc.

        You appear to be trying to run a report that does not exist, which is what the error (that is an Access error, not Hyena's) is telling you.
        Kevin Stanush
        SystemTools Software Inc.

        Comment


        • #5
          Re: Fix Hyena Reporting Database

          As strange as this is, I resolved the problem by recreating the Custom Tabular view of the data that I had created long ago. I created a fresh copy with the same fields and everything started working. Very strange indeed, but I am happy I fixed it.

          Thank you to everyone for your suggestions. Although they did not effectively resolve the problem I was happening, I appreciate you taking the time to respond.

          Comment

          Working...
          X