组合已使用子报表的报表

问题描述:

我知道有一些关于如何使用子报表等组合2个报告的帖子。

I know that there are a few posts on how to combine 2 reports by using a subreport and such.

我正在使用iReport 5.6和Fishbowl库存系统。

我的问题与2个特定的默认鱼缸报告有关。我正在尝试合并工作订单旅行者报告和选择故障单报告,以便他们同时打印出来。

My question has to do with 2 specific default fishbowl reports. I am trying to combine the Work Order Travelor report and the Pick Ticket report so that they print out at the same time.

我遇到的问题是,Pick Ticket报告已经内置了一个子报告,我在传递参数时遇到问题(PT报告有12个参数)。我是否需要在主报告中传递所有12个,然后这也适用于WO Traveler报告?

The issue I am having is that the Pick Ticket report already has a subreport built into it and I am having issues passing the parameters (PT report has 12 parameters). Do I need to pass all 12 in my master report and then does that apply to the WO Traveler report too?

我只是希望它们都能够打印示例:第一页是Pick Ticket,第二页是WO Traveler。

I simply want them to both be able to print example: 1st page is Pick Ticket and 2nd page is WO Traveler.

感谢您的帮助!

您必须传递所有参数。您可以查看批处理报告以查看此操作的示例,并为您提供一些内容。
你可以改变的一件事是,而不是通过$ P {moNum}和$ P {pickId},你可以从顶级报告的查询中传递字段,你选择了MO并且查询找到然后传递任何相关的选择ID。

You will have to pass all parameters through. You can look at the batch reports to see an example of this in action and give you something to go off of. One thing you can change however is instead of passing through the $P{moNum} and $P{pickId} you can pass through fields from the query of the top level report that you select the MO on and the query finds any associated pick ID's that are then passed through.

您正在寻找类似的东西:

You'd be looking for something like:

SELECT DISTINCT Mo.num AS moNum, PickItem.pickId
FROM Mo
    INNER JOIN MoItem ON Mo.id = MoItem.moId
    INNER JOIN Wo ON MoItem.id = Wo.moItemId
    INNER JOIN WoItem ON Wo.id = WoItem.woId
    INNER JOIN PickItem ON WoItem.id = PickItem.woItemId
WHERE Mo.num LIKE $P{moNum}