
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-03-2010 04:31 PM
I have several of the reports which I would like to omit specific computers from. And do not want the Console to report them as well. I do not want to remove them completely just omit from certain reports and monitoring.
Is there a generic line of code that can be entered in each query, where I can add the computer name(s) to be omitted?
I am looking to augment the server and workstation reports of less than 1 GB on HDD, Computer not seen in 30 days, and Computer does not meet minimum requirements.
I did find an older post that pertained to only showing C: drives but the code in it did not work correctly.
Help on this is greatly appreciated.
Derek
Is there a generic line of code that can be entered in each query, where I can add the computer name(s) to be omitted?
I am looking to augment the server and workstation reports of less than 1 GB on HDD, Computer not seen in 30 days, and Computer does not meet minimum requirements.
I did find an older post that pertained to only showing C: drives but the code in it did not work correctly.
Help on this is greatly appreciated.
Derek
Labels:
- Labels:
-
Report Center
4 REPLIES 4

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-04-2010 12:30 AM
The statement needs to be placed at the end of the WHERE clause in the report definition (just before the ORDER BY clause).

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-03-2010 11:14 PM
I tried the query but was getting an error
"Invalid Select statement"
Unexpexted token "AND" at line .........
I did create the table with no problem.
What am I missing?
I entered the code at the end of the current script in the report builder. Just keep getting errors
"Invalid Select statement"
Unexpexted token "AND" at line .........
I did create the table with no problem.
What am I missing?
I entered the code at the end of the current script in the report builder. Just keep getting errors

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-03-2010 09:31 PM
Create a new table in lansweeperdb called ExcludedMachines, with a single column to hold the Computername ID.
Add the Computername ID of the machines which you want to exclude to the table.
You can now add a WHERE ... IN check to the reports in question. For example, for the web40repHDDFreeWorkstations (Workstations with less then 1GB free), add the following to the end of the WHERE clause:
This will allow you to add machines to the excluded list without having to change every report in question.
CREATE TABLE lansweeperdb.dbo.ExcludedMachines (Computername INT PRIMARY KEY);
Add the Computername ID of the machines which you want to exclude to the table.
You can now add a WHERE ... IN check to the reports in question. For example, for the web40repHDDFreeWorkstations (Workstations with less then 1GB free), add the following to the end of the WHERE clause:
AND lansweeperdb.dbo.tblComputers.Computername NOT IN (SELECT Computername FROM lansweeperdb.dbo.ExcludedMachines)
This will allow you to add machines to the excluded list without having to change every report in question.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-03-2010 09:21 PM
You could add an extra filter to the sql:
Where computer not like 'computername1' and computer not like 'computername2'
Where computer not like 'computername1' and computer not like 'computername2'
