public Dictionary <string, object> LoadReportFromDB(string reportName, string operationalMode, string analysisMode, string olapReport, string clientReports)
        {
            PivotReport report = new PivotReport();
            Dictionary <string, object> dictionary = new Dictionary <string, object>();
            string currentRptName = string.Empty;

            foreach (DataRow row in GetDataTable().Rows)
            {
                currentRptName = (row.ItemArray[0] as string).Replace("##" + operationalMode.ToLower() + "#>>#" + analysisMode.ToLower(), "");
                if (currentRptName.Equals(reportName))
                {
                    if (operationalMode.ToLower() == "servermode" && analysisMode == "olap")
                    {
                        string          reportString = "";
                        OlapDataManager DataManager  = new OlapDataManager();
                        reportString        = OLAPUTILS.Utils.CompressData(row.ItemArray[1] as byte[]);
                        DataManager.Reports = pivotClient.DeserializedReports(reportString);
                        DataManager.SetCurrentReport(DataManager.Reports[0]);
                        return(pivotClient.GetJsonData("toolbarOperation", DataManager, "Load Report", reportName));
                    }
                    else
                    {
                        byte[] reportString = new byte[2 * 1024];
                        reportString = (row.ItemArray[1] as byte[]);
                        if (analysisMode.ToLower() == "pivot" && operationalMode.ToLower() == "servermode")
                        {
                            dictionary = pivotClient.GetJsonData("LoadReport", ProductSales.GetSalesData(), Encoding.UTF8.GetString(reportString));
                        }
                        else
                        {
                            dictionary.Add("report", Encoding.UTF8.GetString(reportString));
                        }

                        break;
                    }
                }
            }
            return(dictionary);
        }
        public Dictionary <string, object> DrillChart(Dictionary <string, object> jsonResult)
        {
            OlapDataManager DataManager = new OlapDataManager(connectionString);

            DataManager.SetCurrentReport(OLAPUTILS.Utils.DeserializeOlapReport(jsonResult["olapReport"].ToString()));
            DataManager.Reports = olapClientHelper.DeserializedReports(jsonResult["clientReports"].ToString());
            return(chartHelper.GetJsonData(jsonResult["action"].ToString(), DataManager, jsonResult["drilledSeries"].ToString()));
        }
Esempio n. 3
0
        public Dictionary <string, object> DrillTreeMap(string action, string drillInfo, string olapReport, string clientReports)
        {
            OlapDataManager DataManager = new OlapDataManager(connectionString);

            DataManager.SetCurrentReport(OLAPUTILS.Utils.DeserializeOlapReport(olapReport));
            DataManager.Reports = olapClientHelper.DeserializedReports(clientReports);
            return(treeMapHelper.GetJsonData(action, DataManager, drillInfo));
        }
        public Dictionary <string, object> CubeChange(string action, string cubeName, string olapReport, string clientReports, string clientParams)
        {
            OlapDataManager DataManager = new OlapDataManager(connectionString);

            if (olapReport != "")
            {
                DataManager.SetCurrentReport(OLAPUTILS.Utils.DeserializeOlapReport(olapReport));
            }
            if (clientReports != "")
            {
                DataManager.Reports = olapClientHelper.DeserializedReports(clientReports);
            }
            return(olapClientHelper.GetJsonData(action, DataManager, cubeName, clientParams));
        }