//Set task properties
Properties props = new Properties();
props.put(APIConst.TAG_RESULT_TYPE, String.valueOf(APIConst.RST));
//Set result file location.
props.put(APIConst.TAG_RESULT_LOCATION_TYPE, "0");
props.put(APIConst.TAG_RESULT_LOCATION, "/SampleReports");
System.out.println("========to pdf=" + props);
String tempResult = server.runReport("admin", catalog, rptName, props);
System.out.println("========tempResult="+tempResult);
//Export to HTML
props.put(APIConst.TAG_HTML, "Crosstab");
props.put(APIConst.TAG_HTML_DIR, "/SampleReports");
props.put(APIConst.TAG_HTML_DIR_TYPE, String.valueOf(APIConst.TAG_LOCATION_TO_SERVER_RESOURCE_PATH));
System.out.println("\n========exportResult="+props);
ExportedFileList fileList = server.exportResult("admin", tempResult, props);
System.out.println("\n========fileList.getHTMLFilenameList()="+fileList.getHTMLFilenameList());