<%@page contentType="text/html; charset=UTF-8"%> <%@page import="com.csc.library.entry.HelpEntry,com.csc.library.system.*,com.csc.library.utilities.*,com.csc.library.session.*,com.csc.library.report.*"%> <%@page import="com.csc.library.export.*"%> <%@page import="jxl.Workbook,java.io.File"%> <%@ page import="java.text.SimpleDateFormat" %> <%@ page import="java.util.*" %> <%@ page import="java.text.DecimalFormat" %> <%@ page import="com.csc.library.database.*" %> <jsp:useBean id="XLSOPTION" class="com.csc.library.system.Task" scope="page" /> <% XLSOPTION.setChannel(request, response); XLSOPTION.checkProfile(); UProfile up=XLSOPTION.getUProfile(); %> <head> <title>Privot</title> <meta http-equiv='Content-Type' content='text/html; charset=UTF-8' /> <script language="JavaScript" type="text/JavaScript"> function getDataPivot(){ with(document.cscform){ var filter = ""; if(__condition.value!=""){ filter += " where "+__condition.value; } if(__groupText.value!=""){ filter += " group by "+__groupText.value; } if(__orderText.value!=""){ filter += " order by "+__orderText.value; } pivot_dwr.getData(Array(__xlsnameFilter.value,__columnlist.value,filter), callbackPivot) } } var callbackPivot = function(data){ if(data != ""){ var value =$.parseJSON(data); //alert(JSON.stringify(value)); webix.ready(function(){ grida = webix.ui({ container:"pivotZone", id:"pivot", view:"pivot", height:400, width:800, data:value, max: true, structure: { } }); }); } $$("pivot").configure(); } function pivotToExcel(){ //document.getElementById("pivotZoneExcel").innerHTML = document.getElementById("pivotZone").innerHTML; webix.toExcel($$("pivot"), { filename: "Pivot", // for filename name: "Pivot", // for sheet name filterHTML:true }); } </script> </head> <body onload=""> <div align="center" class="panel panel-primary"> <div class="panel-heading"> <h3 class="panel-title" align="right"> </h3> </div> <br> <div align="" id="pivotZone"></div><br> <div align="center"> <button type="button" class="btn btn-sm btn-primary" onclick="goFilter()"> BACK </button> <button type="button" class="btn btn-sm btn-primary" onclick="pivotToExcel();">Export</button> </div> <br> </div> <style type="text/css"> html, body { width: 100%; height: 100%; padding: 0; margin: 0; } </style> </script> </body>