
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-01-2014 06:44 PM
I have a custom registry value that is either 0 or 1. I would like to report the count of tblOperatingsystem.Caption where tblregistry.value =1 and count of tblOperatingsystem.Caption where tblregistry.value =0 for a chart.
Can this be done on the same chart?
""
Select Top 1000000 tblOperatingsystem.Caption,
Count(tblRegistry.Value) As count
From tblRegistry
Inner Join tblAssets On tblAssets.AssetID = tblRegistry.AssetID
Inner Join tblOperatingsystem
On tblAssets.AssetID = tblOperatingsystem.AssetID
Where tblRegistry.Value = 1 And tblOperatingsystem.Caption Not Like '%Server%'
And tblRegistry.Regkey Like '%Firewall%'
Group By tblOperatingsystem.Caption
""
Thanks,
T
Can this be done on the same chart?
""
Select Top 1000000 tblOperatingsystem.Caption,
Count(tblRegistry.Value) As count
From tblRegistry
Inner Join tblAssets On tblAssets.AssetID = tblRegistry.AssetID
Inner Join tblOperatingsystem
On tblAssets.AssetID = tblOperatingsystem.AssetID
Where tblRegistry.Value = 1 And tblOperatingsystem.Caption Not Like '%Server%'
And tblRegistry.Regkey Like '%Firewall%'
Group By tblOperatingsystem.Caption
""
Thanks,
T
Solved! Go to Solution.
Labels:
- Labels:
-
Report Center
1 ACCEPTED SOLUTION

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-01-2014 08:56 PM
A chart report should only contain two columns. The easiest way to build your report would be with three columns: one for the OS caption, one for the registry value (0 or 1) and one for the count. The only way to get everything into one chart (i.e. two columns) is to merge the first two fields into a single expression, like so:
Select Top 1000000 'OS: ' + tblOperatingsystem.Caption + ' / Value: ' +
tblRegistry.Value As [OS + Value],
Count(tblRegistry.AssetID) As Count
From tblRegistry
Inner Join tblOperatingsystem On tblOperatingsystem.AssetID =
tblRegistry.AssetID
Where tblRegistry.Regkey Like '%firewall%' And tblOperatingsystem.Caption Not Like '%server%'
Group By 'OS: ' + tblOperatingsystem.Caption + ' / Value: ' + tblRegistry.Value
Order By [OS + Value]
1 REPLY 1

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-01-2014 08:56 PM
A chart report should only contain two columns. The easiest way to build your report would be with three columns: one for the OS caption, one for the registry value (0 or 1) and one for the count. The only way to get everything into one chart (i.e. two columns) is to merge the first two fields into a single expression, like so:
Select Top 1000000 'OS: ' + tblOperatingsystem.Caption + ' / Value: ' +
tblRegistry.Value As [OS + Value],
Count(tblRegistry.AssetID) As Count
From tblRegistry
Inner Join tblOperatingsystem On tblOperatingsystem.AssetID =
tblRegistry.AssetID
Where tblRegistry.Regkey Like '%firewall%' And tblOperatingsystem.Caption Not Like '%server%'
Group By 'OS: ' + tblOperatingsystem.Caption + ' / Value: ' + tblRegistry.Value
Order By [OS + Value]
