Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
BIRT newbie - Subreports
cobirtops
Appreciate the help anyone can give. Here's the given:
Main dset is "WO" with simple sql query of: select wo from workorder where wo = ?. Sample result set would be:
wo
123
Second dset is "PH" with sql of select wo, ph from phase where wo = ?. Sample result set would be:
wo phase
123 001
123 002
123 003
Third dset is "LABOR". SQL would be select wo, ph, timecard from labor where wo = ?. Result would be:
wo phase timecard
123 001 0901
123 001 0904
123 001 1543
123 002 5456
123 003 3987
Last dset is "MATERIAL". SQL is select, wo, ph, release_no from material where wo = ?
wo phase release_no
123 001 02001
123 001 02002
123 002 04545
123 003 06754
My desired report layout is:
WO 123
PH 001
LABOR:
TIMECARD 0901
TIMECARD 0904
TIMECARD 1543
MATERIAL:
RELEASE 02001
RELEASE 02002
PH 002
LABOR:
TIMECARD 5456
MATERIAL:
RELEASE 04545
PH 003
LABOR:
TIMECARD 3987
MATERIAL:
RELEASE 06754
Can this be done by subreport?
Thanks.
Find more posts tagged with
Comments
fwhorton
it looks like it can be.
main report ph (detail 1)
subreport link ph to labor (detail 2)
subreport link ph to material (detail 3)
thuston
I would do it with 2 queries.
1) select wo, ph, timecard from labor
2) select wo, ph, release_no from material where wo = ? and ph = ?
For the layout, create a table for 1 and create Groups for [WO] and [PH].
Put your [timecard] in the Detail
Put a nested table for 2 in the [PH] Group's Footer.
Set the Properties-Binding tab-Bind Parameters to use the outer table's [wo] and [ph] values.
Put [release_no] in this Detail
cobirtops
<blockquote class='ipsBlockquote' data-author="'thuston'" data-cid="68125" data-time="1283546139" data-date="03 September 2010 - 01:35 PM"><p>
I would do it with 2 queries.<br />
<br />
1) select wo, ph, timecard from labor<br />
2) select wo, ph, release_no from material where wo = ? and ph = ?<br />
<br />
For the layout, create a table for 1 and create Groups for [WO] and [PH].<br />
Put your [timecard] in the Detail<br />
Put a nested table for 2 in the [PH] Group's Footer.<br />
Set the Properties-Binding tab-Bind Parameters to use the outer table's [wo] and [ph] values.<br />
Put [release_no] in this Detail<br /></p></blockquote>
<br />
<br />
thuston, those 2 parameters you suggested - wo = ? and ph = ? - that would mean that when ran, the report will prompt for both wo AND ph, correct? What if I only want to prompt users with wo?
thuston
make the ph parameter hidden.
You'll be setting it during execution so it doesn't matter what value it has when submitting.
cobirtops
<blockquote class='ipsBlockquote' data-author="'thuston'" data-cid="68165" data-time="1283867906" data-date="07 September 2010 - 06:58 AM"><p>
make the ph parameter hidden. <br />
You'll be setting it during execution so it doesn't matter what value it has when submitting.<br /></p></blockquote>
<br />
<br />
<br />
It worked!!! Awesome, simply awesome. Thanks very much!