很抱歉,如果这个问题与其他人重复,但我以前在任何地方都没有看过这个话题。
我正在尝试创建一个包含多个子报表的报表。每个子报表都包含一个链接到高图图表的嵌入cvc的组件。
每个子报告都在JasperStudio 6.3.1 CE和JasperServer 6.4.0 CE中单独加载/显示。包含子报表的整个主报表已在Studio上很好地加载,但一旦上传到服务器上,它就不会停止加载。
我已经通过用表替代子报表中的一个的CVC-部件测试的事情,该表随后井旁边显示ONE CVC-嵌入子报表。
当我显示一个我的cvc嵌入式子报表和另一个显示本机数字cvc-component的子报表时,这些文件也可以工作。
因此我猜这个问题与我的自定义脚本相关联...是否有人知道什么可能导致两个子报表在加载时失败?是因为这两个函数具有相同的名称,即使它们是不同子报表的一部分吗?
非常感谢你的帮助: - )
这是我为第一个子报告编译的.js文件:
define('barchartlp',['highcharts'], function (highcharts) {
return function (instanceData) {
var data = [];
var series0 = instanceData.series[0];
for (var index = 0; index < series0.length; ++index) {
var record = series0[index];
data.push(record.value);
}
var config = {
chart: {
renderTo: instanceData.id,
type: 'column',
width: instanceData.width,
height: instanceData.height
},
title: {
text: 'Local Purchase Value'
},
credits: {
enabled: false
},
xAxis: {
labels: {
enabled: true
},
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
title: {
text: null
}
},
yAxis: {
labels: {
enabled: true
},
title: {
text: 'Value (CHF)'
}
},
legend: {
enabled: false
},
plotOptions: {
series: {
animation: false,
lineWidth: 1,
shadow: false,
states: {
hover: {
lineWidth: 1
}
},
marker: {
radius: 1,
states: {
hover: {
radius: 2
}
}
},
fillOpacity: 1
},
column: {
negativeColor: '#910000',
borderColor: 'silver'
}
},
series: [{
data: data
}],
};
new Highcharts.Chart(config);
};
});
这是我为第二个子报告编译的.js文件:
define('barchartlosses',['highcharts'], function (highcharts) {
return function (instanceData) {
var data = [];
var series0 = instanceData.series[0];
for (var index = 0; index < series0.length; ++index) {
var record = series0[index];
data.push(record.value);
}
var config = {
chart: {
renderTo: instanceData.id,
type: 'column',
width: instanceData.width,
height: instanceData.height
},
title: {
text: 'LOSS Value'
},
credits: {
enabled: false
},
xAxis: {
labels: {
enabled: true
},
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
title: {
text: null
}
},
yAxis: {
labels: {
enabled: true
},
title: {
text: 'Value (CHF)'
}
},
legend: {
enabled: false
},
plotOptions: {
series: {
animation: false,
lineWidth: 1,
shadow: false,
states: {
hover: {
lineWidth: 1
}
},
marker: {
radius: 1,
states: {
hover: {
radius: 2
}
}
},
fillOpacity: 1
},
column: {
negativeColor: '#910000',
borderColor: 'silver'
}
},
series: [{
data: data
}],
};
new Highcharts.Chart(config);
};
});
这是第一个build.js文件:
({
baseUrl: '',
paths: {
'highcharts': 'highcharts'
},
name: "barchartlp",
out: "barchartlp.min.js"
})
硬编码数据:
SELECT 5 AS Loss_Value
UNION ALL
SELECT 10 AS Loss_Value
UNION ALL
SELECT 12 AS Loss_Value
UNION ALL
SELECT 8 AS Loss_Value
UNION ALL
SELECT 10 AS Loss_Value
UNION ALL
SELECT 15 AS Loss_Value