Subreport with negative y coordinate prints wrong on second page with jaspersoft - jasper-reports

I'm currently working with Jaspersoft Studio (version 5.6.2.final) to create PDF documents. I'm currently running into a problem which I could use some help with.
I have one master report which contains 3 subreports. Each of the subreports is full fledged document with their own header, detail and (last)pageFooter band. Each of the subreports are created in their own detail band with pagebreak so they each subreports start on a new page. So far there aren't any issues.
Now the customer wants a page number on every page on a specific place in the document, this place corresponds to a specific part of the header of each of the subreports. See the image below:
Location of the pagenumber http://puu.sh/dAZzg/edaa1285c4.png
What I did to enable this is create a pageHeader in the master report which contains the pageNumber. Then I gave each of the subreports a negative y-coordinate so they slide over the pageHeader thus printing the pageNumber on exactly the right location. This works partially.
<pageHeader>
<band height="159">
<property name="local_mesure_unitheight" value="cm"/>
<textField>
<reportElement x="483" y="145" width="31" height="14" uuid="f512ea15-2e4b-4c63-bf92-61b990d9c461">
<property name="local_mesure_unitheight" value="cm"/>
<property name="com.jaspersoft.studio.unit.height" value="cm"/>
<property name="local_mesure_unity" value="cm"/>
<property name="com.jaspersoft.studio.unit.y" value="cm"/>
</reportElement>
<textElement textAlignment="Left">
<font fontName="Amerigo BT"/>
</textElement>
<textFieldExpression><![CDATA[$V{PAGE_NUMBER}]]></textFieldExpression>
</textField>
</band>
</pageHeader>
<detail>
<band height="83" splitType="Stretch">
<property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.VerticalRowLayout"/>
<subreport>
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="-56" y="-175" width="573" height="83" uuid="5e4141a0-ac50-485a-8269-40b607c67466">
<property name="local_mesure_unity" value="cm"/>
<property name="com.jaspersoft.studio.unit.y" value="cm"/>
<property name="local_mesure_unitx" value="cm"/>
<property name="com.jaspersoft.studio.unit.x" value="cm"/>
</reportElement>
<dataSourceExpression><![CDATA[((net.sf.jasperreports.engine.data.JRXmlDataSource)$P{REPORT_DATA_SOURCE}).subDataSource("//idbfyl:fiscalYearReportLetter")]]></dataSourceExpression>
<subreportExpression><![CDATA["FiscalYearReportLetter.jasper"]]></subreportExpression>
</subreport>
</band>
<band height="83" splitType="Stretch">
<break>
<reportElement x="0" y="0" width="513" height="1" uuid="43e0cd6d-cc0b-4ce9-ae2f-0d8d2b498896"/>
</break>
<subreport>
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="-56" y="-175" width="573" height="70" uuid="df524b80-9db1-43b7-9c45-3b8ea21c8081">
<property name="local_mesure_unity" value="cm"/>
<property name="com.jaspersoft.studio.unit.y" value="cm"/>
</reportElement>
<dataSourceExpression><![CDATA[((net.sf.jasperreports.engine.data.JRXmlDataSource)$P{REPORT_DATA_SOURCE}).subDataSource("//idbfyvr:fiscalYearValueReport")]]></dataSourceExpression>
<subreportExpression><![CDATA["FiscalYearValueReport.jasper"]]></subreportExpression>
</subreport>
</band>
<band height="83" splitType="Stretch">
<break>
<reportElement x="0" y="0" width="513" height="1" uuid="bcddb440-2fdd-49c2-98cc-7978260c8d34"/>
</break>
<subreport>
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="-56" y="-175" width="573" height="70" isRemoveLineWhenBlank="true" isPrintInFirstWholeBand="true" uuid="df524b80-9db1-43b7-9c45-3b8ea21c8081">
<property name="local_mesure_unity" value="cm"/>
<property name="com.jaspersoft.studio.unit.y" value="cm"/>
</reportElement>
<dataSourceExpression><![CDATA[((net.sf.jasperreports.engine.data.JRXmlDataSource)$P{REPORT_DATA_SOURCE}).subDataSource("//ibdfyir:fiscalYearIncomeReport")]]></dataSourceExpression>
<subreportExpression><![CDATA["FiscalYearIncomeReport.jasper"]]></subreportExpression>
</subreport>
</band>
</detail>
Every first page of a subreports prints on the correct location, but on every page after the first one the subreport is printed below the pageHeader, it seems like the negative y coordinate is reset to 0.
Is there a way to force every page of a subreport to start from the same negative y-coordinate, or is there another way to achieve what I need?
Cheers,
Rick
PS. The example pictures start from page 2 because the first subreport only consists of 1 page. I've also removed sensitive data from the screenshot so don't worry about the white spaces you see.

I had similar problem. Try to place the pageNumber in the details band of the master report and mark it isPrintWhenDetailOverFlows to get pageNumber to print on all pages when subreport overflows.

Related

Lines are visible only on the 1st page

Here is my detail band:
<detail>
<band height="20" splitType="Stretch">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<printWhenExpression><![CDATA[$V{antibioResult}]]></printWhenExpression>
<subreport>
<reportElement mode="Opaque" x="1" y="1" width="798" height="19" forecolor="#172983" uuid="d6dabfde-0ea9-4b6b-83c4-b557815cedee">
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="com.jaspersoft.studio.unit.x" value="px"/>
</reportElement>
<subreportParameter name="binary_id">
<subreportParameterExpression><![CDATA[$P{binary_id}]]></subreportParameterExpression>
</subreportParameter>
<dataSourceExpression><![CDATA[$P{REPORT_DATA_SOURCE}]]></dataSourceExpression>
<subreportExpression><![CDATA["bacreport.jasper"]]></subreportExpression>
</subreport>
<line>
<reportElement style="borderLine" stretchType="ContainerHeight" mode="Opaque" x="0" y="0" width="1" height="20" uuid="d5cb2ecc-f71a-4a3c-8d27-7be4c5a86da5">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
</reportElement>
</line>
<line>
<reportElement style="borderLine" stretchType="ContainerHeight" x="800" y="0" width="1" height="20" uuid="08e46ff8-8a65-406b-9164-a6737baa022e">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="com.jaspersoft.studio.unit.x" value="px"/>
</reportElement>
</line>
</band>
</detail>
And here is BorderLine style:
<style name="borderLine" forecolor="#172983"/>
Two lines are visible only in 1st page and not visible in others.
How to fix that?
UPD: It's looks like the lines is not drawn after page break. So how to stretch those line to the whole subreport to several pages?
Found a solution: set "Details Overflows" flag to the Line element.

Stretching field below another stretching field in the same group footer

Background
I have a report where the completed analyses are supposed to show below the outstanding work. I had the completed analyses set to float
If there is a lot of completed work, the field seems to stretch but does not print the information
I changed this completed analyses field to be fixed relative to top, and now it prints all of the information but overlaps if the Outstanding field expands
Thanks in advance for anybody who can help.
SQL
create table analyses (ID int not null IDENTITY PRIMARY KEY, info1 varchar(max), info2 varchar(max))
insert into analyses values ('short string', 'short string')
insert into analyses values ('Extremely long string which is so long that I don''t know how I can carry on thinking of things to write so I will just keep writing things like this until I get bored and eventually it will be long enough I think, well probably, not entirely sure','Extremely long string which is so long that I don''t know how I can carry on thinking of things to write so I will just keep writing things like this until I get bored and eventually it will be long enough I think, well probably, not entirely sure')
insert into analyses values ('another short string', 'another short string')
JRXML
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.4.3.final using JasperReports Library version 5.0.1 -->
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="Blank_A4_3" pageWidth="400" pageHeight="842" columnWidth="360" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="7f2b0070-ae21-43b8-aed2-2d97e01f5788">
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/>
<property name="com.jaspersoft.studio.unit." value="pixel"/>
<queryString>
<![CDATA[select * from analyses]]>
</queryString>
<field name="ID" class="java.lang.Integer"/>
<field name="Info1" class="java.lang.String"/>
<field name="Info2" class="java.lang.String"/>
<group name="Group1">
<groupExpression><![CDATA[$F{ID}]]></groupExpression>
<groupHeader>
<band height="24">
<staticText>
<reportElement x="188" y="0" width="62" height="24" uuid="c63aa7bc-0916-4bc4-b00a-2b2f7e0ecdc1">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
</reportElement>
<text><![CDATA[Info 1 +]]></text>
</staticText>
<staticText>
<reportElement x="251" y="0" width="68" height="24" forecolor="#EB3431" uuid="4915813a-f96b-4bd4-a278-5d51378419f5">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
</reportElement>
<text><![CDATA[Info 2]]></text>
</staticText>
<staticText>
<reportElement x="0" y="0" width="188" height="24" uuid="94aa55be-e050-4488-933d-d29497fe1adb">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
</reportElement>
<text><![CDATA[ID]]></text>
</staticText>
</band>
</groupHeader>
<groupFooter>
<band height="24">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<textField>
<reportElement x="0" y="0" width="185" height="12" uuid="5b4f1d89-0191-4607-bca5-715d3828bbaa">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement>
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{ID}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true">
<reportElement x="185" y="0" width="135" height="12" uuid="ac96f759-7c22-4877-afb1-a7529d61a067">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
</reportElement>
<textElement>
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{Info1}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true">
<reportElement positionType="Float" x="185" y="12" width="135" height="12" forecolor="#EB221E" uuid="44747f9d-582d-4b46-a729-104a0f5c7eaa">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
</reportElement>
<textElement>
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{Info2}]]></textFieldExpression>
</textField>
</band>
</groupFooter>
</group>
<background>
<band splitType="Stretch"/>
</background>
</jasperReport>
For the 'Completed' textfield:
choose position type = 'Float'
choose stretch type = 'No Stretch'
make sure the 'Stretch with Overflow' option is checked (true)

How to set stacked bar chart graph "Fit to page size" report using Jaspersoft studio?

How to set stacked bar chart graph "Fit to page size" (the graph should cover the whole page and stretch according to data without overlapping) in jasper report using Jaspersoft studio ?
I have taken "Chart_elememt" inside "Frame_element". I have tried changing the appearance properties of Chart_element and Frame_element but none of them worked.
Basically, I had two graphs in one .jrxml which created the problem of x-y axis (was not able to start both the graphs by "0" x-axis i.e. from bottom of my page), so I created sub-report and moved the second graph into it. Now my first graph is working fine, but second graph (in sub-report) is still reflecting shrinked and overlapping data though I have kept same properties as I have for my first graph.
In sub-report - Shrinked Graph (Data overlapping and is not Fit-to-page)
In main report - Expected Graph
Main report source code where subreport is called:
<subreport>
<reportElement stretchType="RelativeToTallestObject" x="0" y="1002" width="1088" height="20">
<property name="local_mesure_unitx" value="pixel"/>
<property name="com.jaspersoft.studio.unit.x" value="px"/>
<property name="local_mesure_unity" value="pixel"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="local_mesure_unitheight" value="pixel"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<subreportParameter name="start">
<subreportParameterExpression><![CDATA[$P{start}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="end">
<subreportParameterExpression><![CDATA[$P{end}]]></subreportParameterExpression>
</subreportParameter>
<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
<subreportExpression><![CDATA["QuantitéRelancesCause_subreport.jasper"]]></subreportExpression>
</subreport>
Subreport source code:
<title>
<band height="1051">
<staticText>
<reportElement mode="Transparent" x="410" y="10" width="250" height="40">
<property name="local_mesure_unity" value="pixel"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
</reportElement>
<textElement textAlignment="Center">
<font size="20"/>
<paragraph lineSpacing="Single"/>
</textElement>
<text><![CDATA[Quantité relances/cause]]></text>
</staticText>
<frame>
<reportElement positionType="FixRelativeToBottom" stretchType="RelativeToBandHeight" mode="Transparent" x="0" y="80" width="1090" height="904" isRemoveLineWhenBlank="true">
<property name="local_mesure_unitheight" value="pixel"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="local_mesure_unity" value="pixel"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.FreeLayout"/>
<property name="local_mesure_unitwidth" value="pixel"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
<property name="local_mesure_unitx" value="pixel"/>
<property name="com.jaspersoft.studio.unit.x" value="px"/>
</reportElement>
<stackedBarChart>
<chart isShowLegend="false" evaluationTime="Report">
<reportElement positionType="Float" stretchType="RelativeToBandHeight" mode="Transparent" x="0" y="80" width="1080" height="824">
<property name="net.sf.jasperreports.chart.range.axis.tick.interval" value="1"/>
<property name="local_mesure_unitx" value="pixel"/>
<property name="com.jaspersoft.studio.unit.x" value="px"/>
<property name="local_mesure_unity" value="pixel"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="local_mesure_unitwidth" value="pixel"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
<property name="local_mesure_unitheight" value="pixel"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<chartTitle/>
<chartSubtitle/>
<chartLegend/>
</chart>
<categoryDataset>
<categorySeries>
<seriesExpression><![CDATA[$F{DESCRIPTION}]]></seriesExpression>
<categoryExpression><![CDATA[$F{DESCRIPTION}]]></categoryExpression>
<valueExpression><![CDATA[$F{COUNT(DISTINCT(PIECE_ID))}]]></valueExpression>
</categorySeries>
</categoryDataset>
<barPlot isShowLabels="true" isShowTickLabels="true" isShowTickMarks="true">
<plot labelRotation="-45.0"/>
<itemLabel/>
<categoryAxisFormat labelRotation="-45.0">
<axisFormat/>
</categoryAxisFormat>
<valueAxisFormat>
<axisFormat/>
</valueAxisFormat>
</barPlot>
</stackedBarChart>
</frame>
</band>
</title>

strech one field in a frame nove overflowing other frames in a band

I have 4 frames created in a group header. All the four frames have 2 fields one label and the second value from query. Value filed in all the four frames is set to 'stretch when overflow'=true.
when I run a report when frame 1-value field has huge text it is stretching but the other frames are not moving their position.
Frame 1 is overlapping the frame 2. Frame 2 ,3 and 4 are not changing their position. This is a big report with almost 10 frames.
When frame1- field value is strecheched how to move position of other frames. I tried to set the position to float but it didnot help.
Sample:
<frame>
<reportElement style="FrameBorder" stretchType="RelativeToBandHeight" x="0" y="340" width="1040" height="100">
<property name="com.jaspersoft.studio.unit.x" value="pixel"/>
<property name="com.jaspersoft.studio.unit.height" value="pixel"/>
<property name="com.jaspersoft.studio.unit.width" value="pixel"/>
</reportElement>
<textField>
<reportElement key="" style="GroupHeader" x="0" y="0" width="1040" height="20" isRemoveLineWhenBlank="true">
<property name="com.jaspersoft.studio.unit.width" value="pixel"/>
</reportElement>
<textFieldExpression><![CDATA[$R{SRUpdateKey}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true">
<reportElement style="Detail" positionType="Float" stretchType="RelativeToTallestObject" x="4" y="26" width="1035" height="64">
<property name="com.jaspersoft.studio.unit.width" value="pixel"/>
</reportElement>
<textElement verticalAlignment="Top"/>
<textFieldExpression><![CDATA[$F{SR_REPORT_UPDATE}]]></textFieldExpression>
</textField>
</frame>

Jasper SubReport doesnt' show in Master

I asked a similar question a year ago and didn't discover a resolution. The subreport I am working on now is in the detail band of the master, although I did try it in others just in case.
<detail>
<band height="34" splitType="Stretch">
<subreport>
<reportElement stretchType="RelativeToTallestObject" isPrintRepeatedValues="false" mode="Transparent" x="0" y="0" width="555" height="34" uuid="6318f4b9-c420-4294-a63f-1a83d338f755">
<property name="local_mesure_unitheight" value="pixel"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<subreportParameter name="item_id">
<subreportParameterExpression><![CDATA[$F{item_id}]]></subreportParameterExpression>
</subreportParameter>
<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
<subreportExpression><![CDATA["report.jasper"]]></subreportExpression>
</subreport>
</band>
</detail>
I checked the path to the subreport is correct. In the subreport the parameter_name is exactly the same. The .jasper file is compiled successfully.
The master report has a call to a stored procedure, and I am using one of the fields it is returning as the subreport parameter. I called it 'item_id' here. I used the wizard to map that to the subreport parameter with the same name. The idea is that the subreport should return additional information about each of the item_ids returned by the SP in the master report.
When I run the subreport on it's own it returns data for a particular item_id. I created a variable in the master to track how many rows the SP itself returns and when I run the master it shows the correct number of rows exist but no data displays on the master report. It also leaves enough empty space to appear to indicate that something is being returned but just not displayed. When I set 'remove line when blank' for the subreport element in properties from the master report I get no rows - so apparently it is returning a blank line 44 times - one for each row. Or is it?
One suggestion was to remove the connection_expression and replace it with parameters_map_expression but that didn't help either.
My best guess is that the subreport data is not getting to the master for some reason. If anyone has any suggestions I am open to anything I can do with JasperSoftStudio 6.3.
Master report:
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 5.6.2.final using JasperReports Library version 5.6.1 -->
<!-- 2016-09-07T10:21:37 -->
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="ITEMMRPT" language="groovy" pageWidth="595" pageHeight="842" whenNoDataType="AllSectionsNoDetail" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="1aa96e89-cb24-464e-90bf-0d12bc48a516">
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="staging"/>
<parameter name="billing_year" class="java.lang.Integer">
<defaultValueExpression><![CDATA[2015]]></defaultValueExpression>
</parameter>
<parameter name="billing_month" class="java.lang.Integer">
<defaultValueExpression><![CDATA[9]]></defaultValueExpression>
</parameter>
<parameter name="billing_day" class="java.lang.Integer">
<defaultValueExpression><![CDATA[1]]></defaultValueExpression>
</parameter>
<parameter name="report_type" class="java.lang.String">
<defaultValueExpression><![CDATA["DAILY"]]></defaultValueExpression>
</parameter>
<parameter name="area_cd" class="java.lang.String">
<defaultValueExpression><![CDATA["TACM"]]></defaultValueExpression>
</parameter>
<queryString language="SQL">
<![CDATA[exec createitembillingReport;1 #billing_year = $P{billing_year}, #billing_month = $P{billing_month}, #billing_day = $P{billing_day},#report_type=$P{report_type},#area_cd = $P{area_cd}]]>
</queryString>
<field name="item_id" class="java.lang.String"/>
<field name="item_name" class="java.lang.String"/>
<variable name="total" class="java.lang.Integer" calculation="Count">
<variableExpression><![CDATA[$F{item_id}]]></variableExpression>
</variable>
<background>
<band splitType="Stretch"/>
</background>
<title>
<band height="67">
<staticText>
<reportElement x="60" y="33" width="242" height="17" uuid="06a14aaf-07b9-4894-bc60-0f5b3b254826">
<property name="local_mesure_unitheight" value="pixel"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement>
<font size="11"/>
</textElement>
<text><![CDATA[Item Listing]]></text>
</staticText>
<staticText>
<reportElement x="60" y="50" width="78" height="17" uuid="365238e1-9e5f-471b-92aa-aadab4fcfc31">
<property name="local_mesure_unitheight" value="pixel"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement>
<font size="11" isBold="true"/>
</textElement>
<text><![CDATA[Billable as of :]]></text>
</staticText>
<textField>
<reportElement x="138" y="50" width="180" height="17" uuid="c735ec59-4e96-4b22-bf70-08af130efed9"/>
<textElement>
<font size="11" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$P{billing_month}+"/"+$P{billing_day}+"/"+$P{billing_year}]]></textFieldExpression>
</textField>
</band>
</title>
<columnHeader>
<band height="18">
<staticText>
<reportElement x="16" y="0" width="70" height="17" uuid="79476ab9-e5ea-40ec-b382-b22a0c5d355a">
<property name="local_mesure_unitheight" value="pixel"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement>
<font size="12" isBold="true"/>
</textElement>
<text><![CDATA[Item ID]]></text>
</staticText>
<staticText>
<reportElement x="479" y="0" width="61" height="17" uuid="adb588f3-ed71-439a-acde-d812acee6a94">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement>
<font size="12" isBold="true"/>
</textElement>
<text><![CDATA[Location]]></text>
</staticText>
<staticText>
<reportElement x="260" y="0" width="97" height="17" uuid="243ce68e-c532-4056-958e-08f7a0f83d2a">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement>
<font size="12" isBold="true"/>
</textElement>
<text><![CDATA[Pull Date]]></text>
</staticText>
<staticText>
<reportElement x="89" y="0" width="87" height="17" uuid="ca299eb7-2aba-4529-ae76-3dfa4c6abe29">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement>
<font size="12" isBold="true"/>
</textElement>
<text><![CDATA[Order Date]]></text>
</staticText>
<staticText>
<reportElement x="380" y="0" width="86" height="17" uuid="c220e72b-bd29-416a-95fc-c6c8a10ab081">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement>
<font size="12" isBold="true"/>
</textElement>
<text><![CDATA[Ship Date]]></text>
</staticText>
<staticText>
<reportElement x="168" y="0" width="92" height="17" uuid="2ea414c5-4484-48dc-a6b5-52d4ab3ebd97">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement>
<font size="12" isBold="true"/>
</textElement>
<text><![CDATA[Description]]></text>
</staticText>
<line>
<reportElement x="0" y="17" width="555" height="1" uuid="ab7d193f-96d3-454a-8fdd-5e0027425d42">
<property name="local_mesure_unitheight" value="pixel"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
</line>
</band>
</columnHeader>
<detail>
<band height="20" splitType="Stretch">
<subreport>
<reportElement isPrintRepeatedValues="false" mode="Transparent" x="0" y="4" width="555" height="16" uuid="6318f4b9-c420-4294-a63f-1a83d338f755">
<property name="local_mesure_unitheight" value="pixel"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<subreportParameter name="item_id">
<subreportParameterExpression><![CDATA[$F{item_id}]]></subreportParameterExpression>
</subreportParameter>
<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
<subreportExpression><![CDATA["report.jasper"]]></subreportExpression>
</subreport>
<textField>
<reportElement x="10" y="-1" width="100" height="16" uuid="91285585-7366-46c3-b248-9dbaf0c80839"/>
<textFieldExpression><![CDATA[$F{item_id}]]></textFieldExpression>
</textField>
</band>
</detail>
<pageFooter>
<band height="15">
<textField>
<reportElement x="110" y="0" width="100" height="15" uuid="54e9321a-c062-49f4-8b32-02f4c41458c0"/>
<textElement textAlignment="Right"/>
<textFieldExpression><![CDATA["Page " + $V{PAGE_NUMBER}]]></textFieldExpression>
</textField>
<textField evaluationTime="Report">
<reportElement x="210" y="0" width="100" height="15" uuid="00b215e9-ba28-413b-ad44-4c4a3aac7fdd"/>
<textElement textAlignment="Left"/>
<textFieldExpression><![CDATA[" of " + $V{PAGE_NUMBER}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="400" y="-1" width="50" height="15" uuid="0dae2a30-28fe-4a71-9dc9-ec906ec05c78"/>
<text><![CDATA[Run Date :]]></text>
</staticText>
<textField pattern="MMMMM dd, yyyy">
<reportElement x="450" y="1" width="100" height="13" uuid="34cfa033-e43d-4668-852d-3019f322ea5a"/>
<textFieldExpression><![CDATA[new SimpleDateFormat("MMM dd, yyyy").format(TODAY())]]></textFieldExpression>
</textField>
</band>
</pageFooter>
<summary>
<band height="18">
<textField>
<reportElement x="120" y="2" width="50" height="16" uuid="4a336320-9341-42dd-98c4-1cec2c2d6a15"/>
<textFieldExpression><![CDATA[$V{total}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="10" y="2" width="100" height="13" uuid="00887a5b-9421-402b-98b8-b041f08959f0">
<property name="local_mesure_unitheight" value="pixel"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<text><![CDATA[Total Items]]></text>
</staticText>
</band>
</summary>
Subreport:
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 5.6.2.final using JasperReports Library version 5.6.1 -->
<!-- 2016-09-07T10:37:50 -->
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="report" pageWidth="555" pageHeight="802" whenNoDataType="AllSectionsNoDetail" columnWidth="555" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" uuid="9014add6-11f0-4647-97ec-9b9f3f78afce">
<parameter name="item_id" class="java.lang.String" isForPrompting="false"/>
<queryString language="SQL">
<![CDATA[select b.item_id,
b.order_dt,
cpnv.item_desc,
cpnv.pull_dt,
b.ship_dt,
location = (select bjc.location_cd
from warehouse_location bjc
where bjc.item = b.item_id
and bjc.location_start_dt =
(select max(location_start_dt)
from warehouse_location
where item_id = b.item_id))
from item_names cpnv
join items b
ON cpnv.sub_id = b.sub_id
where (ship_dt is null or ship_dt >= '1-24-16 22:00')
and b.item_id = $P{item_id}]]>
</queryString>
<field name="item_id" class="java.lang.String"/>
<field name="order_dt" class="java.sql.Timestamp"/>
<field name="item_desc" class="java.lang.String"/>
<field name="pull_dt" class="java.sql.Timestamp"/>
<field name="ship_dt" class="java.sql.Timestamp"/>
<field name="location" class="java.lang.String"/>
<background>
<band splitType="Stretch"/>
</background>
<detail>
<band height="41" splitType="Stretch">
<textField isStretchWithOverflow="true" evaluationTime="Band" isBlankWhenNull="false">
<reportElement x="9" y="11" width="67" height="20" isPrintWhenDetailOverflows="true" uuid="12d147f8-532b-4ed5-a249-e03661099e4f">
<property name="local_mesure_unitheight" value="pixel"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textFieldExpression><![CDATA[$F{item_id}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" evaluationTime="Band" isBlankWhenNull="false">
<reportElement x="89" y="11" width="78" height="20" isPrintWhenDetailOverflows="true" uuid="76ea3e37-9b7a-44e3-a1ae-5850072b90ef">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textFieldExpression><![CDATA[new SimpleDateFormat("MM/dd/yy hh:mm").format($F{order_dt})]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" evaluationTime="Band" isBlankWhenNull="false">
<reportElement x="168" y="11" width="156" height="20" isPrintWhenDetailOverflows="true" uuid="9ab7bd73-e633-4d51-8271-00c673750a38">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textFieldExpression><![CDATA[$F{item_desc}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" evaluationTime="Band" isBlankWhenNull="false">
<reportElement x="326" y="11" width="48" height="20" isPrintWhenDetailOverflows="true" uuid="b0ac4ef7-e951-4fb2-ab80-3b6dc3103764">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textFieldExpression><![CDATA[new SimpleDateFormat("MM/dd/yy").format($F{pull_dt})]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" evaluationTime="Band" isBlankWhenNull="false">
<reportElement x="380" y="11" width="69" height="20" isPrintWhenDetailOverflows="true" uuid="83cb0048-4b23-42a9-a48d-63501a9f242d">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textFieldExpression><![CDATA[new SimpleDateFormat("MM/dd/yy hh:mm").format($F{ship_dt})]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" evaluationTime="Band" isBlankWhenNull="false">
<reportElement x="479" y="11" width="54" height="20" isPrintWhenDetailOverflows="true" uuid="67a5bd0d-cd6d-4910-83d0-396fc36781d3">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textFieldExpression><![CDATA[$F{location}]]></textFieldExpression>
</textField>
</band>
</detail>
I changed some of the names of things for proprietary reasons. Hopefully they are consistent. If something doesn't jive it was probably lost in translation.
As noted the query works fine in the subreport. When i give it one of the item_ids from the procedure in the master report it displays all the fields correctly for that item. It just won't come through to the master report.
You could try to print the subreport parameter $P{item_id} in the title band of the subreport to check if the parameter passing works correctly.
Depending on the height of the main reports detail band, Maybe you have to remove the top and bottom margin of the subreport.