cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Solholm
Engaged Sweeper
Hi

I have modified the page that shows the user information, to include a list of the computers that the user has logged on to.
The list only shows the last login for each computer.

I made a new View called TFK_web30lastlogon_computers
SELECT TOP 100 PERCENT Username AS lastuser, MAX([Domain]) AS lastdomain, MAX(logontime) AS lastlogon, Computername
FROM dbo.tblCPlogoninfo
GROUP BY Username, Computername
ORDER BY Username, Computername

Then i made a new stored procedure called TFK_web30searchuser, which uses the new view
CREATE PROCEDURE dbo.TFK_web30searchuser(@name varchar(300))
AS SELECT dbo.tblADusers.Displayname, dbo.tblADusers.Title, dbo.tblADusers.Company, dbo.tblADusers.Department, dbo.tblADusers.Username,
dbo.tblADusers.Firstname, dbo.tblADusers.Lastname, dbo.tblADusers.Telephone, dbo.tblADusers.email, dbo.tblADusers.Userdomain,
dbo.tblADusers.Mobile, dbo.TFK_web30lastlogon_computers.lastlogon, dbo.TFK_web30lastlogon_computers.Computername
FROM dbo.tblADusers LEFT OUTER JOIN
dbo.TFK_web30lastlogon_computers ON dbo.tblADusers.Username = dbo.TFK_web30lastlogon_computers.lastuser AND
dbo.tblADusers.Userdomain = dbo.TFK_web30lastlogon_computers.lastdomain
WHERE (dbo.tblADusers.Username LIKE @name COLLATE SQL_Latin1_General_Cp1_CI_AI + '%') OR
(dbo.tblADusers.Firstname LIKE @name COLLATE SQL_Latin1_General_Cp1_CI_AI + '%') OR
(dbo.tblADusers.Lastname LIKE @name COLLATE SQL_Latin1_General_Cp1_CI_AI + '%') OR
(dbo.tblADusers.Displayname LIKE @name COLLATE SQL_Latin1_General_Cp1_CI_AI + '%') OR
(dbo.tblADusers.Displayname LIKE '%' + ' ' + @name COLLATE SQL_Latin1_General_Cp1_CI_AI + '%') OR
(dbo.tblADusers.Department LIKE @name COLLATE SQL_Latin1_General_Cp1_CI_AI + '%')
ORDER BY dbo.TFK_web30lastlogon_computers.Lastlogon desc
GO

Then last a modified the ASPX file it-userdetail.aspx, by adding the computerlisting from the APSX file it-searchuser.aspx

<%@ Page Language="VB" ContentType="text/html" %>
<%@ Register TagPrefix="MM" Namespace="DreamweaverCtrls" Assembly="DreamweaverCtrls,version=1.0.0.0,publicKeyToken=836f606ede05d46a,culture=neutral" %>

<!-- Connection info for Brukerinfo -->

<MM:DataSet
runat="Server"
id="dscomputers"
IsStoredProcedure="true"
CreateDataSet="true"
ConnectionString='<%# System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_STRING_Lansweeper") %>'
DatabaseType='<%# System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_DATABASETYPE_Lansweeper") %>'
CommandText="dbo.web30userdetails"
Debug="true"
><Parameters>
<Parameter Name="@RETURN_VALUE" Type="Int" Direction="ReturnValue" />
<Parameter Name="@username" Value='<%# request("username") %>' Type="VarChar" Direction="Input" />
<Parameter Name="@userdomain" Value='<%# request("userdomain") %>' Type="VarChar" Direction="Input" />
</Parameters></MM:DataSet>
<MM:PageBind runat="server" PostBackBind="true" />
<MM:PageBind runat="server" PostBackBind="true" />

<!-- Connectioninfo for Computerliste -->

<MM:DataSet
runat="Server"
id="CIcomputers"
IsStoredProcedure="true"
CreateDataSet="true"
ConnectionString='<%# System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_STRING_Lansweeper") %>'
DatabaseType='<%# System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_DATABASETYPE_Lansweeper") %>'
CommandText="dbo.TFK_web30searchuser"
Debug="true"
><Parameters>
<Parameter Name="@RETURN_VALUE" Type="Int" Direction="ReturnValue" />
<Parameter Name="@name" Value='<%# request("username") %>' Type="VarChar" Direction="Input" />
</Parameters></MM:DataSet>
<MM:PageBind runat="server" PostBackBind="true" />


<link href="css/ls.css" rel="stylesheet" type="text/css" />

<table width="100%" border="0" cellpadding="0" cellspacing="1">
<tr>
<td>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="images/users.png" width="48" height="40" hspace="4" /></td>
<td>
<table border="0" cellspacing="2" cellpadding="0">
<tr>
<td class="lijntje"><font size="4"><strong><%# dscomputers.FieldValue("Displayname", Container) %></strong></font></td>
</tr>
<tr>
<td><span class="bigt" >User details </span></td>
</tr>
</table>
</td>
</tr>
</table>
</td>

<td>
<!-- Blank felt-->
</td>
</tr>

<tr>
<td>
<table width="100%" border="0" cellspacing="4" cellpadding="0">
<tr>
<td valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="2" class="box">
<tr>
<td valign="top" width="80%">
<table width="100%" border="0" cellpadding="3" cellspacing="0" bgcolor="#FFFFFF" class="borderbox">
<tr>
<td valign="top">
<table width="100%" border="0" cellpadding="3" cellspacing="0" bgcolor="#FFFFFF" class="borderbox">
<tr>
<td align="right" class="lijntje"><strong>Title:</strong>&nbsp;</td>
<td class="lijntje"><%# dscomputers.FieldValue("title", Container) %>&nbsp;</td>
</tr>
<tr class="ne">
<td align="right" class="lijntje"><strong>Department:</strong>&nbsp;</td>
<td class="lijntje"><%# dscomputers.FieldValue("department", Container) %>&nbsp;</td>
</tr>
<tr >
<td align="right" class="lijntje"><strong>Office:</strong>&nbsp;</td>
<td class="lijntje"><%# dscomputers.FieldValue("Office", Container) %>&nbsp;</td>
</tr>
<tr class="ne">
<td align="right" class="lijntje"><strong>Upn:</strong>&nbsp;</td>
<td class="lijntje"><%# dscomputers.FieldValue("UPN", Container) %>&nbsp;</td>
</tr>
<tr >
<td align="right" class="lijntje"><strong>Username:</strong>&nbsp;</td>
<td class="lijntje"><%# dscomputers.FieldValue("Username", Container) %>&nbsp;</td>
</tr>
<tr class="ne">
<td align="right" class="lijntje"><strong>Domain:</strong>&nbsp;</td>
<td class="lijntje"><%# dscomputers.FieldValue("Userdomain", Container) %>&nbsp;</td>
</tr>
<tr >
<td align="right" class="lijntje"><strong>Last computer:</strong>&nbsp;</td>
<td class="lijntje"><a href="default.aspx?item=compdetail&amp;comp=<%# dscomputers.FieldValue("Computername", Container) %>"><%# dscomputers.FieldValue("Computername", Container) %></a>&nbsp;</td>
</tr>
<tr class="ne">
<td align="right" class="lijntje"><strong>Last logon:</strong>&nbsp;</td>
<td class="lijntje"><%# dscomputers.FieldValue("lastlogon", Container) %>&nbsp;</td>
</tr>
<tr >
<td align="right" class="lijntje"><strong>E-mail:</strong>&nbsp;</td>
<td class="lijntje"><a href="mailto:<%# dscomputers.FieldValue("email", Container) %>"><%# dscomputers.FieldValue("email", Container) %></a>&nbsp;</td>
</tr>
<tr class="ne">
<td align="right" class="lijntje"><strong>Telephone:</strong>&nbsp;</td>
<td class="lijntje"><a href="callto:<%# dscomputers.FieldValue("Telephone", Container) %>"><%# dscomputers.FieldValue("Telephone", Container) %></a>&nbsp;</td>
</tr>
<tr >
<td align="right" class="lijntje"><strong>Mobile:</strong>&nbsp;</td>
<td class="lijntje"><a href="callto:<%# dscomputers.FieldValue("Mobile", Container) %>"><%# dscomputers.FieldValue("Mobile", Container) %></a>&nbsp;</td>
</tr>
<tr class="ne">
<td align="right" class="lijntje"><strong>Fax:</strong>&nbsp;</td>
<td class="lijntje"><%# dscomputers.FieldValue("Fax", Container) %>&nbsp;</td>
</tr>
<tr >
<td align="right" valign="top" class="lijntje"><strong>Company:</strong>&nbsp;</td>
<td class="lijntje"><%# dscomputers.FieldValue("company", Container) %>&nbsp;<br />
<%# dscomputers.FieldValue("street", Container) %>&nbsp;<br />
<%# dscomputers.FieldValue("zip", Container) %>&nbsp;<%# dscomputers.FieldValue("city", Container) %><br />
<%# dscomputers.FieldValue("country", Container) %></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<td valign="top"><img src="smallthumb.aspx?user=<%# dscomputers.FieldValue("Username", Container) %>&amp;domain=<%# dscomputers.FieldValue("Userdomain", Container) %>&amp;size=200" class="picbox" />
</td>
</tr>
</table>
</td>

</tr>
</table>
</td>




</tr>

<tr>
<td>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="images/users.png" width="48" height="40" hspace="4" />
</td>
<td>
<table border="0" cellspacing="2" cellpadding="0">
<tr>
<td class="lijntje"><span class="bigt">Results for search &quot;<%=request("username")%>&quot;</span>
</td>
</tr>
<tr>
<td><%= CIcomputers.RecordCount %> items found
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>

<td>
<!-- blank felt -->
<td>
</tr>

<tr>
<td><%if CIcomputers.recordcount <> 0 then%>
<table width="100%" border="0" cellpadding="2" cellspacing="0">
<tr>
<td valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="2" class="box">
<tr>
<td valign="top">
<table width="100%" border="0" cellpadding="3" cellspacing="0" bgcolor="#FFFFFF" class="borderbox">
<tr>
<td valign="top">
<table width="100%" border="0" cellpadding="3" cellspacing="0" bgcolor="#FFFFFF" class="borderbox">
<tr>
<td valign="middle" class="tblcell">&nbsp;</td>
<td valign="middle" class="tblcell">Display name&nbsp;</td>
<td valign="middle" class="tblcell">Department&nbsp;</td>
<td valign="middle" class="tblcell">Title&nbsp;</td>
<td valign="middle" class="tblcell">Computer&nbsp;</td>
<td valign="middle" class="tblcell">Logon Time&nbsp;</td>
</tr>
<%dim tal as integer
dim CIrow as system.data.datarow
tal = 1%>
<% For Each CIrow In CIcomputers.DefaultView.Table.Rows%>
<tr <%if (tal mod 2) = 0 then%>class="ne"<%end if%>>
<td height="30" align="center" valign="middle" class="lijntje"><a href="default.aspx?item=userdetail&amp;username=<%=CIrow("username") %>&amp;userdomain=<%=CIrow("userdomain")%>"><img src="smallthumb.aspx?user=<%=CIrow("username") %>&amp;domain=<%=CIrow("userdomain") %>&amp;size=26" border="0" align="baseline" class="pic" /></a></td>
<td class="lijntje"><a href="default.aspx?item=userdetail&amp;username=<%=CIrow("username") %>&amp;userdomain=<%=CIrow("userdomain")%>"><%=CIrow("displayname") %></a>&nbsp;</td>
<td class="lef"><%=CIrow("department") %>&nbsp;</td>
<td class="lef"><%=CIrow("title") %>&nbsp;</td>
<td class="lef"><a href="default.aspx?item=compdetail&amp;comp=<%=CIrow("Computername") %>"><%=CIrow("computername") %></a>&nbsp;</td>
<td align="right" class="lef"><%=CIrow("lastlogon") %>&nbsp;</td>
</tr><%tal = tal + 1%>
<%next%>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<%end if%>
</td>

<td>
<!-- blank felt -->
</td>
</tr>

</table>


Now when i search for a user and click to get the user details displayed i also get to se all the computers where the user has login.
25 REPLIES 25
Jrobinson
Engaged Sweeper
That's perfect, exactly what staff have been asking for
Solholm
Engaged Sweeper
yes it still works great.
Cobra7
Champion Sweeper
So is this script still working in LS 3.2?
Pollak
Engaged Sweeper III
I am confused at to what i need to do to get this to work. I copied and pasted the aspx text into the it-userdetail.apsx file over writting the current text. I get the follwoing when I view the User Details.

System.Data.SqlClient.SqlException: Invalid object name 'dbo.TFK_web30lastlogon_computers'.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
at System.Data.SqlClient.SqlDataReader.get_MetaData()
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable)



Please advise,
Niles
Pollak
Engaged Sweeper III
I recent rebuilt my Lansweeper server and when I exacute the following I get...

"Parameter object is improperly defined. Inconsistent or incomplete information was provided"

<%@ Page Language="VB" ContentType="text/html" %>
<%@ Register TagPrefix="MM" Namespace="DreamweaverCtrls" Assembly="DreamweaverCtrls,version=1.0.0.0,publicKeyToken=836f606ede05d46a,culture=neutral" %>

<!-- Connection info for Brukerinfo -->

<MM:DataSet
runat="Server"
id="dscomputers"
IsStoredProcedure="true"
CreateDataSet="true"
ConnectionString='<%# System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_STRING_Lansweeper") %>'
DatabaseType='<%# System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_DATABASETYPE_Lansweeper") %>'
CommandText="dbo.web30userdetails"
Debug="true"
><Parameters>
<Parameter Name="@RETURN_VALUE" Type="Int" Direction="ReturnValue" />
<Parameter Name="@username" Value='<%# request("username") %>' Type="VarChar" Direction="Input" />
<Parameter Name="@userdomain" Value='<%# request("userdomain") %>' Type="VarChar" Direction="Input" />
</Parameters></MM:DataSet>
<MM:PageBind runat="server" PostBackBind="true" />
<MM:PageBind runat="server" PostBackBind="true" />

<!-- Connectioninfo for Computerliste -->

<MM:DataSet
runat="Server"
id="CIcomputers"
IsStoredProcedure="true"
CreateDataSet="true"
ConnectionString='<%# System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_STRING_Lansweeper") %>'
DatabaseType='<%# System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_DATABASETYPE_Lansweeper") %>'
CommandText="dbo.TFK_web30searchuser"
Debug="true"
><Parameters>
<Parameter Name="@RETURN_VALUE" Type="Int" Direction="ReturnValue" />
<Parameter Name="@name" Value='<%# request("username") %>' Type="VarChar" Direction="Input" />
</Parameters></MM:DataSet>
<MM:PageBind runat="server" PostBackBind="true" />


<link href="css/ls.css" rel="stylesheet" type="text/css" />

<table width="100%" border="0" cellpadding="0" cellspacing="1">
<tr>
<td>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="images/users.png" width="48" height="40" hspace="4" /></td>
<td>
<table border="0" cellspacing="2" cellpadding="0">
<tr>
<td class="lijntje"><font size="4"><strong><%# dscomputers.FieldValue("Displayname", Container) %></strong></font></td>
</tr>
<tr>
<td><span class="bigt" >User details </span></td>
</tr>
</table>
</td>
</tr>
</table>
</td>

<td>
<!-- Blank felt-->
</td>
</tr>

<tr>
<td>
<table width="100%" border="0" cellspacing="4" cellpadding="0">
<tr>
<td valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="2" class="box">
<tr>
<td valign="top" width="80%">
<table width="100%" border="0" cellpadding="3" cellspacing="0" bgcolor="#FFFFFF" class="borderbox">
<tr>
<td valign="top">
<table width="100%" border="0" cellpadding="3" cellspacing="0" bgcolor="#FFFFFF" class="borderbox">
<tr>
<td align="right" class="lijntje"><strong>Title:</strong>&nbsp;</td>
<td class="lijntje"><%# dscomputers.FieldValue("title", Container) %>&nbsp;</td>
</tr>
<tr class="ne">
<td align="right" class="lijntje"><strong>Department:</strong>&nbsp;</td>
<td class="lijntje"><%# dscomputers.FieldValue("department", Container) %>&nbsp;</td>
</tr>
<tr >
<td align="right" class="lijntje"><strong>Office:</strong>&nbsp;</td>
<td class="lijntje"><%# dscomputers.FieldValue("Office", Container) %>&nbsp;</td>
</tr>
<tr class="ne">
<td align="right" class="lijntje"><strong>Upn:</strong>&nbsp;</td>
<td class="lijntje"><%# dscomputers.FieldValue("UPN", Container) %>&nbsp;</td>
</tr>
<tr >
<td align="right" class="lijntje"><strong>Username:</strong>&nbsp;</td>
<td class="lijntje"><%# dscomputers.FieldValue("Username", Container) %>&nbsp;</td>
</tr>
<tr class="ne">
<td align="right" class="lijntje"><strong>Domain:</strong>&nbsp;</td>
<td class="lijntje"><%# dscomputers.FieldValue("Userdomain", Container) %>&nbsp;</td>
</tr>
<tr >
<td align="right" class="lijntje"><strong>Last computer:</strong>&nbsp;</td>
<td class="lijntje"><a href="default.aspx?item=compdetail&amp;comp=<%# dscomputers.FieldValue("Computername", Container) %>"><%# dscomputers.FieldValue("Computername", Container) %></a>&nbsp;</td>
</tr>
<tr class="ne">
<td align="right" class="lijntje"><strong>Last logon:</strong>&nbsp;</td>
<td class="lijntje"><%# dscomputers.FieldValue("lastlogon", Container) %>&nbsp;</td>
</tr>
<tr >
<td align="right" class="lijntje"><strong>E-mail:</strong>&nbsp;</td>
<td class="lijntje"><a href="mailto:<%# dscomputers.FieldValue("email", Container) %>"><%# dscomputers.FieldValue("email", Container) %></a>&nbsp;</td>
</tr>
<tr class="ne">
<td align="right" class="lijntje"><strong>Telephone:</strong>&nbsp;</td>
<td class="lijntje"><a href="callto:<%# dscomputers.FieldValue("Telephone", Container) %>"><%# dscomputers.FieldValue("Telephone", Container) %></a>&nbsp;</td>
</tr>
<tr >
<td align="right" class="lijntje"><strong>Mobile:</strong>&nbsp;</td>
<td class="lijntje"><a href="callto:<%# dscomputers.FieldValue("Mobile", Container) %>"><%# dscomputers.FieldValue("Mobile", Container) %></a>&nbsp;</td>
</tr>
<tr class="ne">
<td align="right" class="lijntje"><strong>Fax:</strong>&nbsp;</td>
<td class="lijntje"><%# dscomputers.FieldValue("Fax", Container) %>&nbsp;</td>
</tr>
<tr >
<td align="right" valign="top" class="lijntje"><strong>Company:</strong>&nbsp;</td>
<td class="lijntje"><%# dscomputers.FieldValue("company", Container) %>&nbsp;<br />
<%# dscomputers.FieldValue("street", Container) %>&nbsp;<br />
<%# dscomputers.FieldValue("zip", Container) %>&nbsp;<%# dscomputers.FieldValue("city", Container) %><br />
<%# dscomputers.FieldValue("country", Container) %></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<td valign="top"><img src="smallthumb.aspx?user=<%# dscomputers.FieldValue("Username", Container) %>&amp;domain=<%# dscomputers.FieldValue("Userdomain", Container) %>&amp;size=200" class="picbox" />
</td>
</tr>
</table>
</td>

</tr>
</table>
</td>




</tr>

<tr>
<td>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="images/users.png" width="48" height="40" hspace="4" />
</td>
<td>
<table border="0" cellspacing="2" cellpadding="0">
<tr>
<td class="lijntje"><span class="bigt">Results for search &quot;<%=request("username")%>&quot;</span>
</td>
</tr>
<tr>
<td><%= CIcomputers.RecordCount %> items found
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>

<td>
<!-- blank felt -->
<td>
</tr>

<tr>
<td><%if CIcomputers.recordcount <> 0 then%>
<table width="100%" border="0" cellpadding="2" cellspacing="0">
<tr>
<td valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="2" class="box">
<tr>
<td valign="top">
<table width="100%" border="0" cellpadding="3" cellspacing="0" bgcolor="#FFFFFF" class="borderbox">
<tr>
<td valign="top">
<table width="100%" border="0" cellpadding="3" cellspacing="0" bgcolor="#FFFFFF" class="borderbox">
<tr>
<td valign="middle" class="tblcell">&nbsp;</td>
<td valign="middle" class="tblcell">Display name&nbsp;</td>
<td valign="middle" class="tblcell">Department&nbsp;</td>
<td valign="middle" class="tblcell">Title&nbsp;</td>
<td valign="middle" class="tblcell">Computer&nbsp;</td>
<td valign="middle" class="tblcell">Logon Time&nbsp;</td>
</tr>
<%dim tal as integer
dim CIrow as system.data.datarow
tal = 1%>
<% For Each CIrow In CIcomputers.DefaultView.Table.Rows%>
<tr <%if (tal mod 2) = 0 then%>class="ne"<%end if%>>
<td height="30" align="center" valign="middle" class="lijntje"><a href="default.aspx?item=userdetail&amp;username=<%=CIrow("username") %>&amp;userdomain=<%=CIrow("userdomain")%>"><img src="smallthumb.aspx?user=<%=CIrow("username") %>&amp;domain=<%=CIrow("userdomain") %>&amp;size=26" border="0" align="baseline" class="pic" /></a></td>
<td class="lijntje"><a href="default.aspx?item=userdetail&amp;username=<%=CIrow("username") %>&amp;userdomain=<%=CIrow("userdomain")%>"><%=CIrow("displayname") %></a>&nbsp;</td>
<td class="lef"><%=CIrow("department") %>&nbsp;</td>
<td class="lef"><%=CIrow("title") %>&nbsp;</td>
<td class="lef"><a href="default.aspx?item=compdetail&amp;comp=<%=CIrow("Computername") %>"><%=CIrow("computername") %></a>&nbsp;</td>
<td align="right" class="lef"><%=CIrow("lastlogon") %>&nbsp;</td>
</tr><%tal = tal + 1%>
<%next%>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<%end if%>
</td>

<td>
<!-- blank felt -->
</td>
</tr>

</table>






Please advise,
nilesf
salpointe
Engaged Sweeper
I have found what might be an "as programmed" issue with this solution, that in my environment needs to be different.

I have a shared environment of 300+ computers and 1400 users. After implementing this solution, it works fine, but I have found a issue for my environment. If you look at the user information, it does list the computers that a user has logged into, but, it only shows the last login to any computer. As an example, say a user logs into a computer named TEST on November 1st, the information shows up in the list just fine with a date of November 1st. Now the user goes back to that same computer (TEST) and logs in again on November 10th, the computer shows up under the user, with the date of November 10th, but, the login information from November 1st is no longer in the list. So if you are trying to track down who caused an issue with a computer, the listing only shows the last login for any user, and the historical information from previous logins for that user are no longer displayed.

Is it possible to change this?

Also, as my previous post states, to complete this ability to investigate, the same information is needed for the computers, to be able to see all users that have logged into a machine over time.

Thanks for all you do.
salpointe
Engaged Sweeper
Thanks for the solution!!!

I have this working for the users, per the instructions.

I have a School environment, with lots of script kiddies, so I would dearly like to see this same solution for machines, so that we can see everyone that logged into each machine over time.

Thanks for all you guys do!
ortizma13
Engaged Sweeper
This report works great, but i can't seem to get my version of lansweeper to pull the last logged on from any PC besides my own. I have the latest version of lansweeper. Thanks in advance.
trs
Engaged Sweeper
thanks alot works great

New to Lansweeper?

Try Lansweeper For Free

Experience Lansweeper with your own data.
Sign up now for a 14-day free trial.

Try Now