上篇记录了主报表中嵌套子报表,用json数据源设计报表,没有问题了。
本篇记录下子报表中再嵌套子报表(即孙报表)怎么实现。
思路:把需要再嵌套孙报表的子报表sub_report3,当做主报表设计,内嵌的孙报表同样用分组布局放置。
1、设计sub_report3报表布局
如下图所示:
建立了2个group,要嵌入4个子报表。
sub_report3的json数据源如下:
{
"data":{
"isImport":"true",
"applyer":"张三",
"applyTime":"2020-09-26 10:11:11",
"chiefer":"李四",
"chiefTime":"2020-09-26 11:11:11",
"pm":"王五",
"pmTime":"2020-09-26 12:11:11",
"lineItems1":[
{
"isAgree":"同意",
"signRemark":"这就是我要发表的意见,听不听1",
"userName":"紫薯1"
},{
"isAgree":"同意",
"signRemark":"这就是我要发表的意见,听不听2",
"userName":"紫薯"
},{
"isAgree":"同意",
"signRemark":"这就是我要发表的意见,听不听3",
"userName":"紫薯2"
}
],
"lineItems2":[
{
"isAgree":"不同意",
"signRemark":"这就是我要发表的意见,听不听4",
"userName":"紫薯1"
},{
"isAgree":"同意",
"signRemark":"这就是我要发表的意见,听不听6",
"userName":"紫薯3"
}
],
"lineItems3":[
{
"isAgree":"不同意",
"signRemark":"这就是我要发表的意见,听不听5",
"us