Kaseya Community

Report Parts and Named Value Parts

  • Does anyone no how to make these things work rather than my current trial and error guessing game

    There is not a single example of a Named Value Part , and so my only option is to sit and try and guess at how the developers though we could use this.

    I have a simple example where I want to display the Number of times I see "backup failed" in the script log.

    I.e. I am trying to replicate what we could do in the old Exec Summary Reports.

    So my Dataset looks like

    SELECT     COUNT(agentGuid) AS BackupsFailed
    FROM dbo.vScriptLog
    WHERE (ScriptName = 'Backup Fail Log Entry') AND (ScriptDesc = 'Backup Fail')
    
    
    And the Return column is set as "BackupsFailed"
    
    
    This works fine and I get a value returned to to my report ...BUT ... it returns a count for ALL records irrespective of what Org,Group or Machine filter I apply to my report
    So how do I add to the above to get it to filter the result based on the Report Data Filters we are prompted for as we run the reports
    
    
    Sometimes just a single simple example , even one provided in the "Standard Solution Set"  would go a huge way in helping us understand the minds of the Kaseya develpoers
    
    
    Paul
  • Hi Paul,

    Did you manage to figure this out? I am trying to do the exact same thing with event logs and backups...and am having a hard time finding examples.

    Thanks

    Josh

  • Here is an example SQL based Named Value

    SELECT COUNT(dbo.vScriptLog.agentGuid) AS BackupsFailed

    FROM dbo.vScriptLog INNER JOIN

    ReportCenter.MachineFilterList ON dbo.vScriptLog.agentGuid = ReportCenter.MachineFilterList.AgentGuid

    WHERE ReportCenter.MachineFilterList.ReportSessionId =@ReportSessionId

    AND (ScriptName = 'Backup Fail Log Entry') AND (ScriptDesc = 'Backup Fail')

    Use BackupsFailed  as the Return Value

    Create a Parameter called @ReportSessionId  , default = 0 , Type = Decimal , Size = 26

    This will mean the Named Part will adhere to what ever View/Org/Group etc  is selected when the report is run

    Also you can Add

    AND (EventTime BETWEEN @StartDateTime AND @EndDateTime)

    If the report needs to be run over a specific Date range .. e.g. the last 30 days

    So also add 2 more Parameters

    @StartDateTime  Default = gatedate() , type Date , Size = 4

    @EndDateTime. Default = gatedate() - 30  , type Date , Size = 4

    I'm just testing the date bit now .. but should work

    Paul

  • Yes. Nice user friendly custom reports. So glad 6.3 has made reporting so much better and easier.

  • Hi,

    There are a number of System Name Value Parts (NVP) that ship with the product and there are ones that allow you to pick the Agent Procedure, and the time frame (last x days, or previous month) and the log Description filter to create your own Name Value Instance (NVI), and will return the count for you that you want.  You can View these System NVPs, using the View button on the toolbar, to see the underlying SQL and parameters for creating additional NVIs.  This would be a great place to start.

    Regards,

    Matt Warburton

    Kaseya Professional Services