This topic is locked

Percentage Complete

2/18/2009 5:55:15 PM
ASPRunnerPro General questions
D
dlangham author

Hi,
I have a master/detail set up where the master table holds MS Patch details and the detail table holds Server details to be patched.

What I would like to do is on the Master page (Patches) have a field telling me in a percentage how many servers have been patched for each patch record, each patch could have as many as 2000 servers associated, when you go into the detail page there is an option to set the server as patched by the means of a simple Yes/No dropdown, does anyone know of a way to do this?
Best Regards

Dale

J
Jane 2/19/2009

Hi,
use custom format on the "View as" settings dialog on the Visual Editor tab to select and calculate this value.

Actual code is dependent on the table structure.
You can publish your project on Demo Account and open a ticket at http://support.xlinesoft.com sending a URL to your pages along with detailed description of what you want to achieve and I'll try to help you.

D
dlangham author 2/19/2009

Hi Jane,
I have used the following code and it outputs OK to the session variable but for the whole table:

str = "SELECT CONVERT(varchar, CONVERT(Decimal(5, 2), 100.0 * SUM(Patched_Count) / COUNT([Host Name]))) + '% Complete' FROM dbo.PMT_SERVERS"

Set rstmp = server.CreateObject("ADODB.Recordset")

rstmp.open str,dbConnection

Session("Percentage") = rstmp(0)

rstmp.close

set rstmp=nothing


I need it to filter by the masterkey and I have tried the following but this does not return any values at all, there is something wrong but I cannot find it.

str = "SELECT CONVERT(varchar, CONVERT(Decimal(5, 2), 100.0 * SUM(Patched_Count) / COUNT([Host Name]))) + '% Complete' FROM dbo.PMT_SERVERS where

Patch_ID='" & Session(strTableName & "_masterkey1") &"'"
Set rsTemp = server.CreateObject("ADODB.Recordset")

rsTemp.open str, dbConnection
Session("Percentage") = rstmp(0)
rsTemp.close : set rsTemp = nothing