贾斯珀Async报告-空,为什么
Jasper Async Report - Empty, why?
让我们开始,首先我为特定的报告获取参数,例如
var config = {
url : "http://exmaple.com/jasperserver/rest_v2/reports/reportFolder/exampleReport/inputControls",
method: "GET",
headers: {
Accept: "application/json;"
},
}
一切正常,我得到一个包含输入数组的响应,
数组包含2个对象:
:
{
description: "Date_from",
id: "Date_from",
label: "Date from",
type: "singleValueDate"
}
第二:{
description: "Date_to",
id: "Date_to",
label: "Date_to",
type: "singleValueDate"
}
两个输入都有一个属性:
validationRules[0].dateTimeFormatValidationRule.format = "yyyy-MM-dd"
现在我想运行一个async报告(现在我将async参数传递false,因为这里的代码更少)
var params ={
reportUnitUri: "/reportFolder/exampleReport",
outputFormat: "html",
freshData : true,
saveDataSnapshot : false,
ignorePagination: true,
async : false,
interactive: false,
allowInlineScripts: true,
parameters: {
"Date_from":["2014-08-01"],
"Date_to":["2015-10-08"]
}
}
现在我尝试生成async报告:
var config = {
url : "http://exmaple.com/jasperserver/rest_v2/reportExecutions",
headers: {
Accept: "application/json"
},
data: params,
method: "POST"
}
我得到一个成功的响应,但是
totalPages: 0,
requestId: "0200cf28-300f-4e76-b99e-e479be4980ba",
reportURI: "/reportFolder/exampleReport/",
status: "ready",
exports[0].id: "c9a5578a-6bc8-4c3e-8a78-9056ef19f456",
exports[0].status: "ready",
exports[0].outputResource :{
contentType: "text/html",
outputFinal: true
}
当我试图通过调用
来获得报告的输出时 http://exmaple.com/jasperserver/rest_v2/reportExecutions/0200cf28-300f-4e76-b99e-e479be4980ba/exports/c9a5578a-6bc8-4c3e-8a78-9056ef19f456/outputResource
报告为空。
运行同样的通过:
http://exmaple.com/jasperserver/rest_v2/reports/reportFolder/exampleReport.html?Date_from=2014-08-01&Date_to=2015-09-08
给我一个完整的报告,
谁能指出我做错了什么?:/我很确定这可能是参数有问题,但我尝试了各种方法,我无法自己找到解决方案:/问题是传递给异步报告的参数格式不好,它应该是这样的:
parameters: {
reportParameter: [
{name : "Date_from",value : ["2014-08-01"]},
{name : "Date_to",value : ["2015-10-08"]}
]
}
相关文章:
- 为什么不't Javascript对我的输入值进行了一些重新检查
- 为什么“;未定义的“;在JavaScript中结束循环
- 为什么这在IE中的工作方式与在Firefox中不同
- 知道为什么我的旋转木马不会自动更改图片吗
- 为什么会出现错误;未捕获的类型错误:undefined不是函数;
- 为什么在单独的函数中应用时转换会闪烁/断断续续(D3)
- 为什么在变形之前不缺少Fx
- 为什么JavaScript在for循环为3时向所有4发出警报
- 为什么不是't窗口.恢复正常工作吗?(javascript/jquery)
- 为什么Airbnb风格指南说不鼓励依赖函数名称推断
- 为什么当async标志设置为false时,xmlhttprequest中的代码可以工作,而当它设置为true时却不能工作
- 为什么babel将async/await转换为再生器
- 为什么 async.series 只产生一个输出
- 为什么 JavaScript 函数需要有关键字“async”?“等待”关键字还不够吗?
- 为什么每个任务的计数's的参数在async.waterfall中应该相同
- 贾斯珀Async报告-空,为什么
- 为什么当async为false时,XHR不能设置响应类型
- Nodejs异步编程——为什么有“async"模块需要吗?什么是“回调地狱”/“末日金字塔”
- 为什么bluebird promise内部的async函数抛出的错误没有被.catch()函数捕获?
- 为什么node.js中的async在循环中出错