# Customized Panes for 'xxxxxxxx' Created: 2009/04/09 # PANE:WIP Job Cost Comparison [PANE] ADMIN xxxxxxxx 01000WIP Job Cost Comparison 010 000000500000INVPEN011M000 [VBSCRIPT] ' This script contains functions for customized pane events. ' You must not modify the name of the functions. Option Explicit Function CustomizedPane_OnLoad() dim GraphProperties GraphProperties = GraphProperties & "" GraphProperties = GraphProperties & "" GraphProperties = GraphProperties & "" GraphProperties = GraphProperties & "" 'Panel 1 GraphProperties = GraphProperties & "</AxisX>" GraphProperties = GraphProperties & "<AxisY><Title Text='Value' /></AxisY>" GraphProperties = GraphProperties & "</Panel>" GraphProperties = GraphProperties & "</Panels>" GraphProperties = GraphProperties & "<Series LegendText='Value' Style='Bar' />" GraphProperties = GraphProperties & "</CodejockChart>" CustomizedPane.CodeObject.GraphProperties = GraphProperties RefreshGraph() End Function Function CustomizedPane_OnRefresh() RefreshGraph() End Function Function RefreshGraph() ' Specify the variables to be used when calling the business object dim XMLOut, XMLParam, Job, ExpMatCost, ExpLabCost, MatCostTD, LabCostTD ' Populate the Stockcode variable with the refresh value Job = CustomizedPane.CodeObject.RefreshValue if Job = "" then exit function end if ' Build up the XML that will be supplied to the business object XMLParam = XMLParam & " <Query>" XMLParam = XMLParam & " <Key>" XMLParam = XMLParam & " <Job>" & Job & "</Job>" XMLParam = XMLParam & " </Key>" XMLParam = XMLParam & " </Query>" on error resume next ' Call the business object, supplying the XML and putting the result in to XMLOut XMLOut = CallBO("WIPQRY",XMLParam,"auto") if err then exit function end if ' Switch on error handling on error goto 0 'Load the XmlOut into the DOM Dim xmlDoc, MyVar, FinalString, Count Set xmlDoc = createobject("Msxml2.DOMDocument") xmlDoc.async = false xmlDoc.LoadXML(XMLOut) Set ExpMatCost = xmlDoc.SelectSingleNode("//ExpectedMaterialCost") Set ExpLabCost = xmlDoc.SelectSingleNode("//ExpectedOperationCost") Set MatCostTD = xmlDoc.SelectSingleNode("//MatCostToDate1") Set LabCostTD = xmlDoc.SelectSingleNode("//LabCostToDate1") FinalString = FinalString & "<CodejockChart>" FinalString = FinalString & "<Series><Points>" FinalString = FinalString & "<Point Label='Exp Material' Value='" & ExpMatCost.text & "' />" FinalString = FinalString & "<Point Label='Material Cost' Value='" & MatCostTD.text & "' />" FinalString = FinalString & "<Point Label='Exp Labor' Value='" & ExpLabCost.text & "' />" FinalString = FinalString & "<Point Label='Labor Cost' Value='" & LabCostTD.text & "' />" FinalString = FinalString & "</Points></Series>" FinalString = FinalString & "</CodejockChart>" CustomizedPane.CodeObject.GraphData = FinalString set xmldoc = nothing End Function