Example #1
0
  /** 打开查询结果 */
  public static String[] openQuery(Hashtable params) {

    JParamObject PO = new JParamObject();

    for (Enumeration e = params.keys(); e.hasMoreElements(); ) {
      String key = (String) e.nextElement();
      String val = (String) params.get(key);
      PO.SetValueByParamName(key, val);
    }
    String[] queryResult = new String[2];
    JResponseObject RO =
        (JResponseObject)
            JActiveDComDM.AbstractDataActiveFramework.InvokeObjectMethod(
                "DataReport", "OpenQuery", PO, "");
    String XMLStr = (String) RO.ResponseObject;
    if (RO != null && RO.ResponseObject != null) {
      XMLStr = (String) RO.ResponseObject;
      JXMLBaseObject XMLObj = new JXMLBaseObject(XMLStr);
      Element queryElmt = XMLObj.GetElementByName("Query");
      // 格式
      queryResult[0] = queryElmt.getAttributeValue("QueryFormat");
      // 数据
      queryResult[0] = queryElmt.getAttributeValue("QueryData");
    }
    return queryResult;
  }
Example #2
0
 /**
  * 加载资源
  *
  * @param reportName
  * @return
  */
 public static String loadResource(String reportName) {
   String XMLStr = "";
   JParamObject PO = JParamObject.Create();
   JResponseObject RO =
       (JResponseObject)
           JActiveDComDM.AbstractDataActiveFramework.InvokeObjectMethod(
               "DataReport", "OpenReport", PO, reportName);
   if (RO != null && RO.ResponseObject != null) {
     XMLStr = (String) RO.ResponseObject;
   }
   return XMLStr;
 }