« Previous Next »

Thread: How can i make a good Printer Log (read system event log)

Last post 06-26-2009 10:50 AM by tuxus. 0 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (1 items)

Sort Posts:

  • 06-26-2009, 10:50 AM

    • tuxus
    • Not Ranked
    • Joined on 06-26-2009, 10:16 AM
    • Posts 1

    How can i make a good Printer Log (read system event log)

    Hi all

    I want to make a good printer log. A printer log who count only the true page who was sent to the printer, but with this script when a print job is cancelled the page is counted.

    I don't know how i can substract the page who has cancelled (eventID=13)

     

     here my script

    SELECT
    EXTRACT_TOKEN(Strings,2,'|') As UserName,
    COUNT (*) As Docs ,
    SUM(TO_INT(EXTRACT_TOKEN(Strings,6,'|'))) As Pages
    FROM System
    Where EventID=10 AND timegenerated > '2009-06-25 00:00:00' and timegenerated < '2009-06-30 23:59:00'
    GROUP BY UserName ORDER By Pages DESC

    Thanks for your help


Page 1 of 1 (1 items)
Microsoft Communities