0

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

I am using iReport 5.6 along with Fishbowl Inventory systems.

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.

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?

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

Thanks for any help guys!

Alex K
  • 22,315
  • 19
  • 108
  • 236
Ashton
  • 363
  • 1
  • 4
  • 21

1 Answers1

1

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}
Mamof
  • 181
  • 5
  • 13
  • How do i see the batch reports? – Ashton Mar 07 '16 at 19:04
  • 1
    In the %Fishbowl%/server/reports directory there is a batch folder that has a couple of batch style report files. – Mamof Mar 07 '16 at 19:48
  • After looking at all of the parameters in both the reports (and their own subreports) it looks very complicated and hard to do. What would be the easiest way for me to tackle this issue Mamof? – Ashton Mar 07 '16 at 20:09
  • 1
    There is no easy solution. The parent report has to have all the parameters of the sub-reports so that they can be passed through. The only exception will be the two required parameters (pick id and mo num) that you can replace with field from the parent reports query. The only short cut is you can copy and paste the parameters from the sub-reports as you're making the parent. – Mamof Mar 07 '16 at 20:37
  • Do i have to add even the parameters of the subreport withen the PickTicket that WILL be a subreport? – Ashton Mar 07 '16 at 21:19
  • 1
    Yes. So your main report will need to contain all of the parameters for both the pick ticket as well as the work order traveler in order to pass down the associated parameters for each report. Some parameters may be common in which case you only need to include it once to be used for both or you can rename the parameters if you need separate options for each. – Mamof Mar 08 '16 at 00:44
  • Mamof i am trying to simply put the PickTicket report into a subreport but I keep getting 18 errors that look like this: `com.evnt.eve.modules.ReportHelperModule cannot be resolved to a type                 value = ((com.evnt.eve.modules.ReportHelperModule) ((java.lang.Object)parameter_module.getValue())).getCompanyReportAddress(((java.lang.Integer)field_PICKLOCATIONGROUPID.getValue()), ((java.lang.Boolean)parameter_ShowCountry.getValue())); //$JR_EXPR_ID=23$` **any idea what these errors mean** :/ ? – Ashton Mar 08 '16 at 18:26
  • 1
    It looks like it's missing the fishbowl jar's within iReport. You can remove all the existing classpath jar's and add the jar's from the Fishbowl lib directory to ensure you get the up-to-date jar files. – Mamof Mar 08 '16 at 18:48
  • Thank you that was correct! I appreciate all of your help! – Ashton Mar 08 '16 at 19:02
  • Mamof here is a new question I have posted and would love your feedback! http://stackoverflow.com/questions/35927870/ireport-input-from-multiple-date-ranges – Ashton Mar 10 '16 at 21:56