1
我有2個asp頁面,在第一個我有一個窗體,我通知使用AJAX參數,並將其發送到第二個asp頁面連接到MSSQL數據庫,運行查詢使用日期參數來自第一個ASP頁面,並將查詢結果返回到ASP變量,然後填充Highcharts。Highcharts沒有呈現後發佈阿賈克斯請求
圖形工作正常傳遞變量throght querystrings,但使用AJAX圖形不會畫,沒有錯誤,簡單返回一個空白的圖形。
TESTE.ASP
<!--#include virtual ="/BI/header.asp"-->
<!--#include virtual ="/BI/sidebar.asp"-->
<%
%>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<script>
function OnCheckAvailability()
{
if(window.XMLHttpRequest)
{
oRequest = new XMLHttpRequest();
}
else if(window.ActiveXObject)
{
oRequest = new ActiveXObject("Microsoft.XMLHTTP");
}
oRequest.open("POST", "vendas.asp", true);
oRequest.onreadystatechange = UpdateCheckAvailability;
oRequest.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
oRequest.send("strCmd=availability&strData1=" + document.form1.data1.value);
}
function UpdateCheckAvailability()
{
document.getElementById("Available").innerHTML = oRequest.responseText;
}
</script>
</head>
<body>
<center>
<div>
<form method="post" action="javascript:void(0);" name="form1">
<label for="newuserid">Data:</label>
<input type="text" name="data1" id="data1 size="20" />
<input id="btnCheckAvailability" type="button" value="Check Availability" onClick="OnCheckAvailability();"><br>
<div id="Available"></div>
</form>
VENDAS.ASP
<!--#include virtual ="/BI/LIB/lib.asp"-->
<%
' Form Variables
dim strCmd
dim strdata1
strCmd = trim(Request.Form("strCmd").Item)
strdata1 = trim(Request.Form("strdata1").Item)
'nLimFor = Request.QueryString("fornec")
'nLimProd = Request.QueryString("produto")
Dim nLimFor
Dim nLimProd
Dim DATA1
Dim cEmpr
Dim cEmprOld
Dim cFil
Dim cFilialF
Dim cFilialP
Dim cFornP
Dim strQryL
Dim strQryF
Dim strQryP
Dim strTot
Dim strPT
Dim nCont
'Conexão com o Banco de Dados
\t ' Criar objeto de conexão com a base de dados e executar a Query na tabela SM0
\t Set rsVendEF = Server.CreateObject("ADODB.RecordSet")
\t \t rsVendEF.Open qryEmpFil, strConn
'Seta as variaveis
nLimFor = 15
nLimProd = 15
'DATA1 = strdata1
DATA1 = Dia()
nCont = 0
cEmpr = rsVendEF.Fields("M0_CODIGO")
cFil = rsVendEF.Fields("M0_CODFIL")
cEmprOld = ""
cFornP = ""
'Query das lojas
strQryL = \t " DECLARE "&_
\t \t \t " @DATA VARCHAR(8) = '"&DATA1&"' "&_
\t \t \t " SELECT FILIAL, QUANT, PRODVAL "&_
\t \t \t " FROM("&_
\t \t \t " \t SELECT ISNULL(L2_FILIAL,'') FILIAL, ISNULL(SUM(L2_QUANT),0) QUANT, ISNULL(SUM(L2_VRUNIT),0) PRODVAL "&_
\t \t \t " \t FROM "&xGEmpr("SL2", cEmpr)&" SL2 "&_
\t \t \t " \t WHERE L2_EMISSAO = @DATA "&_
\t \t \t " \t GROUP BY L2_FILIAL WITH CUBE "
'Query de fornecedores
strQryF = \t " DECLARE "&_
\t \t \t " \t @DATA VARCHAR(8) = "&DATA1&", "&_
\t \t \t " \t @ROWS INT = "&nLimFor&" "&_
\t \t \t "SELECT \t \t RANK, FILIAL, NOMEFOR, QUANT, PRODVAL "&_
\t \t \t "FROM "&_
\t \t \t "("&_
\t \t \t " \t SELECT \t RANK() OVER(PARTITION BY FILIAL ORDER BY PRODVAL DESC, FILIAL, NOMEFOR) AS RANK, "&_
\t \t \t " \t \t \t FILIAL, NOMEFOR, QUANT, PRODVAL "&_
\t \t \t " \t FROM("&_
\t \t \t " \t \t \t SELECT \t \t L2_FILIAL FILIAL, A2_NREDUZ NOMEFOR, ISNULL(SUM(L2_QUANT),0) QUANT, ISNULL(SUM(L2_VLRITEM),0) PRODVAL "&_
\t \t \t " \t \t \t FROM \t \t "&xGEmpr("SL2", cEmpr)&" SL2 "&_
\t \t \t " \t \t \t INNER JOIN \t "&xGEmpr("SB1", cEmpr)&" SB1 ON B1_FILIAL = '"&xFilial("SB1",cEmpr,cFil)&"' AND B1_COD = L2_PRODUTO AND B1_MSBLQL <> '1' AND SB1.D_E_L_E_T_ = '' "&_
\t \t \t " \t \t \t INNER JOIN \t "&xGEmpr("SA2", cEmpr)&" SA2 ON A2_FILIAL = '"&xFilial("SA2",cEmpr,cFil)&"' AND A2_COD = B1_PROC AND A2_MSBLQL <> '1' AND SA2.D_E_L_E_T_ = '' "&_
\t \t \t " \t \t \t WHERE \t \t L2_EMISSAO = @DATA AND SL2.D_E_L_E_T_ = '' "&_
\t \t \t " \t \t \t GROUP BY \t L2_FILIAL, A2_NREDUZ "&_
\t \t \t " \t \t) TAB11 "
'Query de Produtos
strQryP = \t " DECLARE "&_
\t \t \t " \t @DATA VARCHAR(8) = '"&DATA1&"', "&_
\t \t \t " \t @ROWS INT = "&nLimProd&" "&_
\t \t \t " SELECT \t RANK, FILIAL, NOMEFOR, NOMEPROD, QUANT, PRODVAL "&_
\t \t \t " FROM "&_
\t \t \t " ("&_
\t \t \t " SELECT \t RANK() OVER(PARTITION BY NOMEFOR ORDER BY PRODVAL DESC, FILIAL, NOMEFOR, NOMEPROD) AS RANK, "&_
\t \t \t " \t \t FILIAL, NOMEFOR, NOMEPROD, QUANT, PRODVAL "&_
\t \t \t " FROM "&_
\t \t \t " ("&_
\t \t \t " \t SELECT \t \t ISNULL(L2_FILIAL,'') FILIAL, ISNULL(A2_NREDUZ,'') NOMEFOR, ISNULL(B1_DESC,'') NOMEPROD, "&_
\t \t \t " \t \t \t \t ISNULL(SUM(L2_QUANT),0) QUANT, ISNULL(SUM(L2_VLRITEM),0) PRODVAL "&_
\t \t \t " \t FROM \t \t "&xGEmpr("SL2", cEmpr)&" SL2 "&_
\t \t \t " \t INNER JOIN \t "&xGEmpr("SB1", cEmpr)&" SB1 ON "&_
\t \t \t " \t \t \t \t B1_FILIAL = '' \t AND B1_COD = L2_PRODUTO AND B1_MSBLQL <> '1' \t \t AND SB1.D_E_L_E_T_ = '' "&_
\t \t \t " \t INNER JOIN \t "&xGEmpr("SA2", cEmpr)&" SA2 ON "&_
\t \t \t " \t \t \t \t A2_FILIAL = '' \t AND A2_COD = B1_PROC \t AND A2_NREDUZ IN "&_
\t \t \t " \t \t \t \t (\t SELECT \t \t NOMEFOR "&_
\t \t \t " \t \t \t \t \t FROM("&_
\t \t \t " \t \t \t \t \t \t SELECT \t RANK() OVER(PARTITION BY FILIAL ORDER BY PRODVAL DESC, FILIAL, NOMEFOR) AS RANK, "&_
\t \t \t " \t \t \t \t \t \t \t \t FILIAL, NOMEFOR, QUANT, PRODVAL "&_
\t \t \t " \t \t \t \t \t \t FROM("&_
\t \t \t " \t \t \t \t \t \t \t SELECT L2_FILIAL FILIAL, A2_NREDUZ NOMEFOR, ISNULL(SUM(L2_QUANT),0) QUANT, ISNULL(SUM(L2_VLRITEM),0) PRODVAL "&_
\t \t \t " \t \t \t \t \t \t \t FROM \t \t "&xGEmpr("SL2", cEmpr)&" SL2 "&_
\t \t \t " \t \t \t \t \t \t \t INNER JOIN \t "&xGEmpr("SB1", cEmpr)&" SB1 ON B1_FILIAL = '"&xFilial("SB1",cEmpr,cFil)&"' AND B1_COD = L2_PRODUTO AND B1_MSBLQL <> '1' AND SB1.D_E_L_E_T_ = '' "&_
\t \t \t " \t \t \t \t \t \t \t INNER JOIN \t "&xGEmpr("SA2", cEmpr)&" SA2 ON A2_FILIAL = '"&xFilial("SA2",cEmpr,cFil)&"' AND A2_COD = B1_PROC AND A2_MSBLQL <> '1' AND SA2.D_E_L_E_T_ = '' "&_
\t \t \t " \t \t \t \t \t \t \t WHERE \t \t L2_FILIAL = '"&xFilial("SL2",cEmpr,cFil)&"' AND L2_EMISSAO = @DATA AND SL2.D_E_L_E_T_ = '' "&_
\t \t \t " \t \t \t \t \t \t \t GROUP BY \t L2_FILIAL, A2_NREDUZ "&_
\t \t \t " \t \t \t \t \t \t \t) TAB11 "&_
\t \t \t " \t \t \t \t \t \t)TAB21 "&_
\t \t \t " \t \t \t \t \t WHERE \t \t TAB21.RANK <= @ROWS "&_
\t \t \t " \t \t \t \t \t ORDER BY \t FILIAL, PRODVAL DESC OFFSET 0 ROWS FETCH NEXT @ROWS ROWS ONLY "&_
\t \t \t " \t \t \t \t) "&_
\t \t \t " \t \t \t \t AND A2_MSBLQL <> '1' AND SA2.D_E_L_E_T_ = '' "&_
\t \t \t " \t WHERE \t \t L2_FILIAL = '"&xFilial("SL2",cEmpr,cFil)&"' AND L2_EMISSAO = @DATA AND SL2.D_E_L_E_T_ = '' "&_
\t \t \t " \t GROUP BY \t L2_FILIAL, A2_NREDUZ, B1_DESC, L2_VLRITEM "&_
\t \t \t ") A "
cEmprOld = cEmpr
rsVendEF.MoveNext
DO WHILE NOT rsVendEF.eof
\t cEmpr = rsVendEF.Fields("M0_CODIGO")
\t cFil = rsVendEF.Fields("M0_CODFIL")
\t 'nCont = nCont + 1
\t If cEmprOld <> cEmpr Then
\t \t cEmprOld = cEmpr
\t \t 'Query das lojas Continuação
\t \t strQryL = strQryL + " \t UNION ALL "&_
\t \t \t \t \t " \t SELECT ISNULL(L2_FILIAL,'') FILIAL, ISNULL(SUM(L2_QUANT),0) QUANT, ISNULL(SUM(L2_VRUNIT),0) PRODVAL "&_
\t \t \t \t \t " \t FROM "&xGEmpr("SL2", cEmpr)&" SL2 "&_
\t \t \t \t \t " \t WHERE L2_EMISSAO = @DATA "&_
\t \t \t \t \t " \t GROUP BY L2_FILIAL WITH CUBE "
\t \t 'Query de fornecedores Continuação
\t \t strQryF = strQryF + " \t UNION ALL "&_
\t \t \t \t \t " \t SELECT \t RANK() OVER(PARTITION BY FILIAL ORDER BY PRODVAL DESC, FILIAL, NOMEFOR) AS RANK, "&_
\t \t \t \t \t " \t \t \t FILIAL, NOMEFOR, QUANT, PRODVAL "&_
\t \t \t \t \t " \t FROM("&_
\t \t \t \t \t " \t \t \t SELECT \t \t L2_FILIAL FILIAL, A2_NREDUZ NOMEFOR, ISNULL(SUM(L2_QUANT),0) QUANT, ISNULL(SUM(L2_VLRITEM),0) PRODVAL "&_
\t \t \t \t \t " \t \t \t FROM \t \t "&xGEmpr("SL2", cEmpr)&" SL2 "&_
\t \t \t \t \t " \t \t \t INNER JOIN \t "&xGEmpr("SB1", cEmpr)&" SB1 ON B1_FILIAL = '"&xFilial("SB1",cEmpr,cFil)&"' AND B1_COD = L2_PRODUTO AND B1_MSBLQL <> '1' AND SB1.D_E_L_E_T_ = '' "&_
\t \t \t \t \t " \t \t \t INNER JOIN \t "&xGEmpr("SA2", cEmpr)&" SA2 ON A2_FILIAL = '"&xFilial("SA2",cEmpr,cFil)&"' AND A2_COD = B1_PROC AND A2_MSBLQL <> '1' AND SA2.D_E_L_E_T_ = '' "&_
\t \t \t \t \t " \t \t \t WHERE \t \t L2_EMISSAO = @DATA AND SL2.D_E_L_E_T_ = '' "&_
\t \t \t \t \t " \t \t \t GROUP BY \t L2_FILIAL, A2_NREDUZ "&_
\t \t \t \t \t " \t \t) TAB12 "
\t End If
\t 'Query de produtos Continuação
\t strQryP = strQryP + " UNION ALL "&_
\t " SELECT \t RANK() OVER(PARTITION BY NOMEFOR ORDER BY PRODVAL DESC, FILIAL, NOMEFOR, NOMEPROD) AS RANK, "&_
\t " \t \t FILIAL, NOMEFOR, NOMEPROD, QUANT, PRODVAL "&_
\t " FROM "&_
\t " ("&_
\t " \t SELECT \t \t ISNULL(L2_FILIAL,'') FILIAL, ISNULL(A2_NREDUZ,'') NOMEFOR, ISNULL(B1_DESC,'') NOMEPROD, "&_
\t " \t \t \t \t ISNULL(SUM(L2_QUANT),0) QUANT, ISNULL(SUM(L2_VLRITEM),0) PRODVAL "&_
\t " \t FROM \t \t "&xGEmpr("SL2", cEmpr)&" SL2 "&_
\t " \t INNER JOIN \t "&xGEmpr("SB1", cEmpr)&" SB1 ON "&_
\t " \t \t \t \t B1_FILIAL = '' \t AND B1_COD = L2_PRODUTO AND B1_MSBLQL <> '1' \t \t AND SB1.D_E_L_E_T_ = '' "&_
\t " \t INNER JOIN \t "&xGEmpr("SA2", cEmpr)&" SA2 ON "&_
\t " \t \t \t \t A2_FILIAL = '' \t AND A2_COD = B1_PROC \t AND A2_NREDUZ IN "&_
\t " \t \t \t \t (\t SELECT \t \t NOMEFOR "&_
\t " \t \t \t \t \t FROM("&_
\t " \t \t \t \t \t \t SELECT \t RANK() OVER(PARTITION BY FILIAL ORDER BY PRODVAL DESC, FILIAL, NOMEFOR) AS RANK, "&_
\t " \t \t \t \t \t \t \t \t FILIAL, NOMEFOR, QUANT, PRODVAL "&_
\t " \t \t \t \t \t \t FROM("&_
\t " \t \t \t \t \t \t \t \t SELECT \t \t L2_FILIAL FILIAL, A2_NREDUZ NOMEFOR, ISNULL(SUM(L2_QUANT),0) QUANT, ISNULL(SUM(L2_VLRITEM),0) PRODVAL "&_
\t " \t \t \t \t \t \t \t \t FROM \t \t "&xGEmpr("SL2", cEmpr)&" SL2 "&_
\t " \t \t \t \t \t \t \t \t INNER JOIN \t "&xGEmpr("SB1", cEmpr)&" SB1 ON B1_FILIAL = '"&xFilial("SB1",cEmpr,cFil)&"' AND B1_COD = L2_PRODUTO AND B1_MSBLQL <> '1' AND SB1.D_E_L_E_T_ = '' "&_
\t " \t \t \t \t \t \t \t \t INNER JOIN \t "&xGEmpr("SA2", cEmpr)&" SA2 ON A2_FILIAL = '"&xFilial("SA2",cEmpr,cFil)&"' AND A2_COD = B1_PROC AND A2_MSBLQL <> '1' AND SA2.D_E_L_E_T_ = '' "&_
\t " \t \t \t \t \t \t \t \t WHERE \t \t L2_FILIAL = '"&xFilial("SL2",cEmpr,cFil)&"' AND L2_EMISSAO = @DATA AND SL2.D_E_L_E_T_ = '' "&_
\t " \t \t \t \t \t \t \t \t GROUP BY \t L2_FILIAL, A2_NREDUZ "&_
\t " \t \t \t \t \t \t \t) TAB11 "&_
\t " \t \t \t \t \t \t)TAB21 "&_
\t " \t \t \t \t \t WHERE \t \t TAB21.RANK <= @ROWS "&_
\t " \t \t \t \t \t ORDER BY \t FILIAL, PRODVAL DESC OFFSET 0 ROWS FETCH NEXT @ROWS ROWS ONLY "&_
\t " \t \t \t \t) "&_
\t " \t \t \t \t AND A2_MSBLQL <> '1' AND SA2.D_E_L_E_T_ = '' "&_
\t " \t WHERE \t \t L2_FILIAL = '"&xFilial("SL2",cEmpr,cFil)&"' AND L2_EMISSAO = @DATA AND SL2.D_E_L_E_T_ = '' "&_
\t " \t GROUP BY \t L2_FILIAL, A2_NREDUZ, B1_DESC, L2_VLRITEM "&_
\t ") A "
\t rsVendEF.MoveNext
Loop
'Query de lojas finalizando
strQryL = strQryL + ") L "&_
\t \t \t \t \t " ORDER BY \t FILIAL ;"
'Query de fornecedores finalizando
strQryF = strQryF + ") TAB21 "&_
\t \t \t \t \t " WHERE \t \t TAB21.RANK <= @ROWS "&_
\t \t \t \t \t " ORDER BY \t FILIAL, PRODVAL DESC ;"
'Query de produtos finalizando
strQryP = strQryP + ") B "&_
\t \t \t \t \t "WHERE B.RANK <= @ROWS "&_
\t \t \t \t \t "ORDER BY "&_
\t \t \t \t \t " \t \t FILIAL, NOMEFOR, PRODVAL DESC-- OFFSET 0 ROWS FETCH NEXT @ROWS ROWS ONLY ;"
'Criando um objeto de conexão com a base de dados e executamos a Query
set rsQryL=Server.CreateObject("ADODB.RecordSet")
rsQryL.Open strQryL, strConexao
set rsQryF=Server.CreateObject("ADODB.RecordSet")
rsQryF.Open strQryF, strConexao
set rsQryP=Server.CreateObject("ADODB.RecordSet")
rsQryP.Open strQryP, strConexao
'TOTALIZADORES
DO WHILE NOT rsQryL.eof
\t If rsQryL.FIELDS("FILIAL") <> "" Then
\t \t Exit Do
\t End If
\t strTot = strTot + cdbl(rsQryL.FIELDS("PRODVAL"))
\t strPT = strPT + cdbl(rsQryL.FIELDS("QUANT"))
' \t strT = \t 100 'strT + cdbl(rsQry.FIELDS("CLIENTES"))
' \t strTKT = \t 100 'strTKT + cdbl(rsQry.FIELDS("TICKET"))
\t rsQryL.MoveNext
Loop
'strTKT = strTKT/nCont
%>
<!-- Trecho HTML do Fonte-->
<html>
<head>
\t <meta name="viewport" content="width=device-width, initial-scale=1">
\t <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<link href="css/bootstrap.min.css" rel="stylesheet" type="text/css">
\t <link href="css/datepicker3.css" rel="stylesheet">
\t <link href="css/styles.css" rel="stylesheet">
\t <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script>
\t <script src="http://code.highcharts.com/highcharts.js"></script>
\t <script src="http://code.highcharts.com/modules/exporting.js"></script>
\t \t <style type="text/css">
\t \t \t ${demo.css}
\t \t \t \t
</style>
<!-- Continuação do Trecho HighCharts do Fonte-->
<script type="text/javascript">
$(
\t function()
\t {
\t \t //create a variable so we can pass the value dynamically
\t \t var chartype = 'column';
\t \t
\t \t //On page load call the function setDynamicChart
\t \t setDynamicChart(chartype);
\t \t
\t \t //jQuery part a- On Click call the function setDynamicChart(dynval) and pass the chart type
\t \t $('.option').click(function(){
\t \t //get the value from 'a' tag
\t \t
\t \t var chartype = $(this).attr('id');
\t \t setDynamicChart(chartype);
\t });
\t \t function setDynamicChart(chartype){
\t \t // Create the chart
\t \t $('#container').highcharts
\t \t (
\t \t \t {
\t \t \t \t chart: \t \t { type: chartype
\t \t \t \t \t \t \t
\t \t \t \t \t \t \t },
\t \t \t \t exporting: \t { enabled: true },
\t \t \t \t navigation: { \t menuItemStyle: \t \t { fontWeight: 'normal', background: 'none' },
\t \t \t \t \t \t \t \t buttonOptions: \t \t { align: 'left' },
\t \t \t \t \t \t \t \t menuItemHoverStyle: { fontWeight: 'bold', background: 'none', color: 'black' }
\t \t \t \t \t \t \t },
\t \t \t \t title: \t \t { text: 'Vendas no Dia' },
\t \t \t \t subtitle: \t { text: 'Clique para detalhes.' },
\t \t \t \t xAxis: \t \t { type: 'category' },
\t \t \t \t yAxis: \t \t { title: { text: 'Valor total por loja em R$' } },
\t \t \t \t legend: \t \t { enabled: false },
\t \t \t \t plotOptions:{ series: { borderWidth: 0, dataLabels: { enabled: true, format: '{point.y:.2f}' } } },
\t \t \t \t tooltip: \t { headerFormat: '<span style="font-size:11px">{series.name}</span><br>',
\t \t \t \t \t \t \t pointFormat: '<span style="color:{point.color}">{point.name}</span>: <b>R$ {point.y:.2f}}</b><br/>'
\t \t \t \t \t \t \t },
\t \t \t \t series: \t \t [{
\t \t \t \t \t \t \t \t name: "Lojas",
\t \t \t \t \t \t \t \t colorByPoint: true,
\t \t \t \t \t \t \t \t data:
\t \t \t \t \t \t \t \t [<% DO WHILE NOT rsQryL.eof %>
\t \t \t \t \t \t \t \t \t <%If rsQryL.Fields("FILIAL") <> "" Then%>
\t \t \t \t \t \t \t \t \t {
\t \t \t \t \t \t \t \t \t \t name: \t \t "Filial: <%=rsQryL.Fields("FILIAL")%>",
\t \t \t \t \t \t \t \t \t \t y: \t \t \t <%Response.Write(REPLACE(rsQryL.Fields("PRODVAL"),",","."))%> ,
\t \t \t \t \t \t \t \t \t \t drilldown: \t "Detalhes F<%=rsQryL.Fields("FILIAL")%>"
\t \t \t \t \t \t \t \t \t },
\t \t \t \t \t \t \t \t \t <% End If %>
\t \t \t \t \t \t \t \t \t <% rsQryL.MoveNext %>
\t \t \t \t \t \t \t \t <% Loop %>
\t \t \t \t \t \t \t \t ]
\t \t \t \t \t \t \t }],
\t \t \t \t drilldown: \t { series:
\t \t \t \t \t \t \t \t [<% DO WHILE NOT rsQryF.eof %>
\t \t \t \t \t \t \t \t \t \t { \t name: \t "Detalhes F<%=rsQryF.Fields("FILIAL")%>",
\t \t \t \t \t \t \t \t \t \t \t colorByPoint: true,
\t \t \t \t \t \t \t \t \t \t \t id: \t \t "Detalhes F<%=rsQryF.Fields("FILIAL")%>",
\t \t \t \t \t \t \t \t \t \t \t data:
\t \t \t \t \t \t \t \t \t \t \t [
\t \t \t \t \t \t \t \t \t \t \t <% cFilialF = rsQryF.Fields("FILIAL") %>
\t \t \t \t \t \t \t \t \t \t \t <% \t DO WHILE NOT rsQryF.eof
\t \t \t \t \t \t \t \t \t \t \t \t If rsQryF.Fields("FILIAL") <> cFilialF Then
\t \t \t \t \t \t \t \t \t \t \t \t \t Exit Do
\t \t \t \t \t \t \t \t \t \t \t \t End If%>
\t \t \t \t \t \t \t \t \t \t \t \t \t {
\t \t \t \t \t \t \t \t \t \t \t \t \t \t name: \t \t "<%=rsQryF.Fields("NOMEFOR")%>",
\t \t \t \t \t \t \t \t \t \t \t \t \t \t y: \t \t \t <%Response.Write(REPLACE(rsQryF.Fields("PRODVAL"),",","."))%>,
\t \t \t \t \t \t \t \t \t \t \t \t \t \t drilldown: \t "F_<%=(rsQryF.Fields("FILIAL")&rsQryF.Fields("NOMEFOR"))%>"
\t \t \t \t \t \t \t \t \t \t \t \t \t },
\t \t \t \t \t \t \t \t \t \t \t \t \t <% rsQryF.MoveNext %>
\t \t \t \t \t \t \t \t \t \t \t \t <%Loop %>
\t \t \t \t \t \t \t \t \t \t \t ]
\t \t \t \t \t \t \t \t \t \t },
\t \t \t \t \t \t \t \t \t \t <%
\t \t \t \t \t \t \t \t \t \t If NOT rsQryP.eof Then
\t \t \t \t \t \t \t \t \t \t \t cFilialP = rsQryP.Fields("FILIAL")
\t \t \t \t \t \t \t \t \t \t End If %>
\t \t \t \t \t \t \t \t \t \t <% DO WHILE NOT rsQryP.eof
\t \t \t \t \t \t \t \t \t \t \t If rsQryP.Fields("FILIAL") <> cFilialP Then
\t \t \t \t \t \t \t \t \t \t \t \t Exit Do
\t \t \t \t \t \t \t \t \t \t \t End If%>
\t \t \t \t \t \t \t \t \t \t \t {
\t \t \t \t \t \t \t \t \t \t \t \t name: \t "F_<%=(rsQryP.Fields("FILIAL") & rsQryP.Fields("NOMEFOR"))%>",
\t \t \t \t \t \t \t \t \t \t \t \t id: \t \t "F_<%=(rsQryP.Fields("FILIAL") & rsQryP.Fields("NOMEFOR"))%>",
\t \t \t \t \t \t \t \t \t \t \t \t data:
\t \t \t \t \t \t \t \t \t \t \t \t [
\t \t \t \t \t \t \t \t \t \t \t \t \t <%cFornP = rsQryP.Fields("FILIAL") & rsQryP.Fields("NOMEFOR")
\t \t \t \t \t \t \t \t \t \t \t \t \t DO WHILE NOT rsQryP.eof
\t \t \t \t \t \t \t \t \t \t \t \t \t If rsQryP.Fields("FILIAL") & rsQryP.Fields("NOMEFOR") <> cFornP Then
\t \t \t \t \t \t \t \t \t \t \t \t \t \t Exit Do
\t \t \t \t \t \t \t \t \t \t \t \t \t End If%>
\t \t \t \t \t \t \t \t \t \t \t \t \t \t {
\t \t \t \t \t \t \t \t \t \t \t \t \t \t \t name: \t \t "<%=rsQryP.Fields("NOMEPROD")%>",
\t \t \t \t \t \t \t \t \t \t \t \t \t \t \t y: \t \t \t <%Response.Write(REPLACE(rsQryP.Fields("PRODVAL"),",","."))%>
\t \t \t \t \t \t \t \t \t \t \t \t \t \t },
\t \t \t \t \t \t \t \t \t \t \t \t \t \t <% rsQryP.MoveNext
\t \t \t \t \t \t \t \t \t \t \t \t \t Loop %>
\t \t \t \t \t \t \t \t \t \t \t \t ]
\t \t \t \t \t \t \t \t \t \t \t },
\t \t \t \t \t \t \t \t \t \t <%Loop
\t \t \t \t \t \t \t \t \t Loop%>
\t \t \t \t \t \t \t \t ]
\t \t \t \t \t \t \t }
\t \t \t });
\t \t } \t \t \t
\t });
\t <%
\t \t ' Fecha os Record Set's
\t \t rsVendEF.Close
\t \t rsQryL.Close
\t \t rsQryF.Close
\t \t rsQryP.Close
\t %>
</script>
<!-- Fim do Trecho HighCharts do Fonte-->
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/data.js"></script>
<script src="https://code.highcharts.com/modules/drilldown.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
</head>
<body>
<div class="col-sm-9 col-sm-offset-3 col-lg-10 col-lg-offset-2 main"><!--/.row-->
<div class="row">
\t <div class="col-lg-12">
\t \t <h1 class="page-header"><!--/.row-->
\t \t </h1>
\t \t \t </div>
\t \t </div>
<div class="row">
\t \t \t <div class="col-xs-12 col-md-6 col-lg-3">
\t \t \t \t <div class="panel panel-blue panel-widget ">
\t \t \t \t \t <div class="row no-padding">
\t \t \t \t \t \t <div class="col-sm-3 col-lg-5 widget-left">
\t \t \t \t \t \t \t <em class="glyphicon glyphicon-shopping-cart glyphicon-l"></em>
\t \t \t \t \t \t </div>
\t \t \t \t \t \t <div class="col-sm-9 col-lg-7 widget-right">
\t \t \t \t \t \t \t <div class="small">Venda Total</div>
\t \t \t \t \t \t \t <div class="small"><% response.Write(FormatCurrency(strTot))%></div>
\t \t \t \t \t \t </div>
\t \t \t \t \t </div>
\t \t \t \t </div>
\t \t \t </div>
\t \t \t <div class="col-xs-12 col-md-6 col-lg-3">
\t \t \t \t <div class="panel panel-orange panel-widget">
\t \t \t \t \t <div class="row no-padding">
\t \t \t \t \t \t <div class="col-sm-3 col-lg-5 widget-left">
\t \t \t \t \t \t \t <em class="glyphicon glyphicon-comment glyphicon-l"></em>
\t \t \t \t \t \t </div>
\t \t \t \t \t \t <div class="col-sm-9 col-lg-7 widget-right">
\t \t \t \t \t \t \t <div class="small">Itens Vendidos</div>
\t \t \t \t \t \t \t <div class="small"><%response.Write(strPT)%></div>
\t \t \t \t \t \t </div>
\t \t \t \t \t </div>
\t \t \t \t </div>
\t \t \t </div>
\t \t \t <div class="col-xs-12 col-md-6 col-lg-3">
\t \t \t \t <div class="panel panel-teal panel-widget">
\t \t \t \t \t <div class="row no-padding">
\t \t \t \t \t \t <div class="col-sm-3 col-lg-5 widget-left">
\t \t \t \t \t \t \t <em class="glyphicon glyphicon-user glyphicon-l"></em>
\t \t \t \t \t \t </div>
\t \t \t \t \t \t <div class="col-sm-9 col-lg-7 widget-right">
\t \t \t \t \t \t \t <div class="small">Clientes</div>
\t \t \t \t \t \t \t <div class="small"><%response.Write(strT)%></div>
\t \t \t \t \t \t </div>
\t \t \t \t \t </div>
\t \t \t \t </div>
\t \t \t </div>
\t \t \t <div class="col-xs-12 col-md-6 col-lg-3">
\t \t \t \t <div class="panel panel-red panel-widget">
\t \t \t \t \t <div class="row no-padding">
\t \t \t \t \t \t <div class="col-sm-3 col-lg-5 widget-left">
\t \t \t \t \t \t \t <em class="glyphicon glyphicon-stats glyphicon-l"></em>
\t \t \t \t \t \t </div>
\t \t \t \t \t \t <div class="col-sm-9 col-lg-7 widget-right">
\t \t \t \t \t \t \t <div class="small">TICKET MED.</div>
\t \t \t \t \t \t \t <div class="small"><%response.Write(FormatCurrency(strTkt))%></div>
\t \t \t \t \t \t </div>
\t \t \t \t \t </div>
\t \t \t \t </div>
\t \t \t </div>
\t \t </div><!--/.row-->
\t \t
\t \t <div class="row">
\t \t \t <div class="col-lg-12">
\t \t \t \t <div class="panel panel-default">
\t \t \t \t \t <div class="panel-heading">Vendas do Dia</div>
\t \t \t \t \t <div class="panel-body">
<div align="right" style="width: 100%; margin: 0 auto; height: 15px;">
\t <a href="javascript:void(0);" class="option" id="column">Colunas - </a>
\t <a href="javascript:void(0);" class="option" id="bar">Barras - </a>
\t <a href="javascript:void(0);" class="option" id="line">Linhas - </a>
\t <a href="javascript:void(0);" class="option" id="pie">Pizza</a>
</div>
<div id="container" style="min-width: 310px; height: 100%; margin: 0 auto"></div>
</body>
</html>
<!-- Fim do Trecho HTML do Fonte-->