SQL Report on Computer Collections Not Working

Comments

3 comments

  • maki

    You dont need define in sql any collections / id-s etc, make generic one and run report directly on collection container, you know, right click and Run Report...

    0
    Comment actions Permalink
  • Colby Bouma

    You need to use WHERE <ComputerFilter>, a special value that Inventory's reporting engine uses to filter your results by the selected collection. https://documentation.pdq.com/PDQInventory/17.1.0.0/sql-reports.htm#creatingsqlreport

    SELECT
    	  Computers.Name
    	, FilePaths.PathName
    	, Files.FileName
    	, Files.Modified
    	, Files.Size
    	, Files.Type
    FROM
    	Computers
    LEFT JOIN
    	Files ON Computers.ComputerId = Files.ComputerId
    LEFT JOIN
    	FilePaths ON Files.FilePathId = FilePaths.FilePathId
    WHERE
    	<ComputerFilter>
    ORDER BY
    	Computers.Name
    
    0
    Comment actions Permalink
  • Michael Bierch

    Ah...enlightenment! Thank you...makes sense...working like a champ!

    Thanks a lot!

    0
    Comment actions Permalink

Please sign in to leave a comment.