Here is my solution for license aggregation:
Open Lansweeper SQL database with MS Management studio.
Find view web30licensecompliance and change it to:
SELECT TOP (100) PERCENT dbo.tblLicenses.softwareName, dbo.tblLicenses.softwareVersion, SUM(dbo.web30repUsedSoftware.[number in use])
AS [number in use], dbo.tblLicenses.Nrlicenses, dbo.tblLicenses.Priceperlicense, CASE WHEN (SUM(dbo.web30repUsedSoftware.[number in use])
> nrlicenses) THEN (SUM(dbo.web30repUsedSoftware.[number in use]) - nrlicenses) ELSE NULL END AS Missing,
CASE WHEN (SUM(dbo.web30repUsedSoftware.[number in use]) > nrlicenses) THEN (SUM(dbo.web30repUsedSoftware.[number in use]) - nrlicenses)
* priceperlicense ELSE NULL END AS Price, dbo.web30repUsedSoftware.SoftwarePublisher AS Publisher
FROM dbo.web30repUsedSoftware INNER JOIN
dbo.tblLicenses ON dbo.web30repUsedSoftware.softwareName LIKE dbo.tblLicenses.softwareName AND
dbo.web30repUsedSoftware.softwareVersion LIKE dbo.tblLicenses.softwareVersion
GROUP BY dbo.tblLicenses.softwareName, dbo.tblLicenses.Nrlicenses, dbo.tblLicenses.Priceperlicense, dbo.tblLicenses.softwareVersion,
dbo.web30repUsedSoftware.SoftwarePublisher
Now find Stored procedure web30softwarepercomputer and change it to:
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[web30softwarepercomputer](@software varchar(1000),
@theversion varchar(200))
AS SELECT TOP 100 PERCENT dbo.tblComputers.Computername AS Computer, dbo.tblOperatingsystem.Description, dbo.tblOperatingsystem.Caption AS OS,
dbo.tblComputers.Domain, dbo.tblComputers.Lastseen
FROM dbo.tblComputers INNER JOIN
dbo.tblSoftware ON dbo.tblComputers.Computername = dbo.tblSoftware.ComputerName LEFT OUTER JOIN
dbo.tblOperatingsystem ON dbo.tblComputers.Computername = dbo.tblOperatingsystem.Computername LEFT OUTER JOIN
dbo.tblComputersystem ON dbo.tblComputers.Computername = dbo.tblComputersystem.Computername
WHERE (dbo.tblSoftware.softwareName LIKE @software) AND (ISNULL(dbo.tblSoftware.softwareVersion, '') LIKE @theversion)
ORDER BY dbo.tblComputers.Computername
Finaly, open table tblLicenses and use % as joker in columns softwareName or softwareVersion, for example:
softwareName=Microsoft Office Enterprise 2007
softwareVersion=12.%
Works for me...
Denis