本文整理汇总了Java中net.sf.jasperreports.olap.result.JROlapResult类的典型用法代码示例。如果您正苦于以下问题:Java JROlapResult类的具体用法?Java JROlapResult怎么用?Java JROlapResult使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
JROlapResult类属于net.sf.jasperreports.olap.result包,在下文中一共展示了JROlapResult类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getFields
import net.sf.jasperreports.olap.result.JROlapResult; //导入依赖的package包/类
@Override
public List<JRDesignField> getFields(DataAdapterService con, JasperReportsConfiguration jConfig, JRDataset jDataset) throws JRException, UnsupportedOperationException {
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("REPORT_PARAMETERS_MAP", new HashMap<String, Object>());
try {
//Here there is the password of the connection
con.contributeParameters(parameters);
} catch (JRException e) {
e.printStackTrace();
}
ParameterUtil.setParameters(jConfig, jDataset, parameters);
parameters.put(JRParameter.REPORT_MAX_COUNT, 2);
Map<String,? extends JRValueParameter> tmpMap = ParameterUtil.convertMap(parameters, jDataset);
JRXmlaQueryExecuter qe = new JRXmlaQueryExecuter(jConfig, jDataset, tmpMap);
JROlapResult result = qe.getResult();
return OlapFieldsProviderSupport.getFieldsFromResult(result);
}
示例2: JROlapDataSource
import net.sf.jasperreports.olap.result.JROlapResult; //导入依赖的package包/类
public JROlapDataSource(JRDataset dataset, JROlapResult result)
{
this.olapResult = result;
axes = result.getAxes();
queryHierarchies = new JROlapHierarchy[axes.length][];
fieldsMaxDepths = new int[axes.length][];
maxDepths = new int[axes.length][];
int hCount = 0;
noTuples = false;
for (int i = 0; i < axes.length; i++)
{
noTuples = (noTuples || axes[i].getTupleCount() == 0);
queryHierarchies[i] = axes[i].getHierarchiesOnAxis();
hCount += queryHierarchies[i].length;
fieldsMaxDepths[i] = new int[queryHierarchies[i].length];
maxDepths[i] = new int[queryHierarchies[i].length];
}
hierarchiesCount = hCount;
axisPositions = new int[axes.length];
if (!noTuples)
{
init(dataset);
}
}
示例3: getResult
import net.sf.jasperreports.olap.result.JROlapResult; //导入依赖的package包/类
public JROlapResult getResult()
{
return monResult;
}