コード例 #1
0
    public static DataSet ExecuteRequest(XmlDocument req)
    {
        try
        {
            string cmd = GetCommandName(req);
            if (string.Compare(cmd, "get_list_of_olap_reports", true) == 0)
            {
                byte[] userIdBytes = GetCommandParameter(req, "user_id");
                long   userId      = BitConverter.ToInt64(userIdBytes, 0);

                // exec
                DataTable dt  = ReportSystem.GetReportHeaders(Convert.ToDecimal(userId), typeof(OlapReport)) as DataTable;
                DataSet   ret = new DataSet();
                ret.Tables.Add(dt);
                return(ret);
            }
            else if (string.Compare(cmd, "GetOlapReportResult", true) == 0)
            {
                byte[] reportIdBytes = GetCommandParameter(req, "report_id");
                long   reportId      = BitConverter.ToInt64(reportIdBytes, 0);

                // todo

                return(null);
            }
        }
        catch (Exception exc)
        {
            return(ExceptionResult(exc));
        }

        return(new DataSet());
    }
コード例 #2
0
    public static string GetUserDataSources(XmlElement cmdEl)
    {
        decimal     userId = decimal.Parse(cmdEl.GetAttribute("USERID"));
        FIDataTable dt     = ReportSystem.GetReportHeaders(userId, typeof(OlapReport));

        XmlDocument doc    = new XmlDocument();
        XmlElement  rootEl = (XmlElement)doc.AppendChild(doc.CreateElement("DATASOURCES"));

        if (dt != null && dt.Rows.Count != 0)
        {
            foreach (DataRow dr in dt.Rows)
            {
                XmlElement el = (XmlElement)rootEl.AppendChild(doc.CreateElement("DATASOURCE"));
                el.SetAttribute("TYPE", "OLAP");
                el.SetAttribute("ID", dr["id"].ToString());
                el.SetAttribute("NAME", dr["name"].ToString());
                el.SetAttribute("DESCR", dr["description"].ToString());
            }
        }
        return(doc.OuterXml);
    }
コード例 #3
0
 public static void GetOlapReportList(decimal userId)
 {
     ReportSystem.GetReportHeaders(userId, typeof(OlapReport));
 }