empty result from a datasink

soapUI pro announcements and discussions

empty result from a datasink

Postby gsugunan » 03 Jan 2012 17:59

with the following testcase report code:
<jasperReport xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xs ... report.xsd" name="ReportTemplate" language="groovy" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="30" bottomMargin="30" xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<property name="ireport.encoding" value="UTF-8"/>
<template>"../../styles.jrtx"</template>
<!--FIELDS & PARAMS-->
<title>
<band height="70">
<textField>
<reportElement x="159" y="13" width="229" height="42"/>
<textElement>
<font size="26"/>
</textElement>
<textFieldExpression class="java.lang.String">$F{name} + " Report"</textFieldExpression>
</textField>
</band>
</title>
<pageHeader>
<band/>
</pageHeader>
<detail>
<band height="122">
<staticText>
<reportElement style="MainHeader" x="0" y="0" width="535" height="35"/>
<textElement/>
<text>DataSink report</text>
</staticText>
<!--SUBREPORTS UNDER HERE-->
<subreport isUsingCache="true">
<reportElement positionType="Float" isPrintRepeatedValues="false" x="0" y="0" width="500" height="30"/>
<dataSourceExpression>$P{DataSinksSubReport}</dataSourceExpression>
<subreportExpression>"subreport:testCaseSubRep"</subreportExpression>
</subreport>
</band>
</detail>
</jasperReport>

using the following subreport code:

<jasperReport xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xs ... report.xsd" name="report name" language="groovy" pageWidth="535" pageHeight="842" columnWidth="535" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<template>"../../styles.jrtx"</template>
<field name="runtime" class="java.lang.String"/>
<columnHeader>
<band height="59">
<staticText>
<reportElement style="ColumnHeader" x="0" y="35" width="122" height="20"/>
<textElement textAlignment="Left" verticalAlignment="Middle"/>
<text>runtime</text>
</staticText>
</band>
</columnHeader>
<detail>
<band height="21">
<textField>
<reportElement x="0" y="1" width="122" height="20"/>
<textElement textAlignment="Left" verticalAlignment="Top"/>
<textFieldExpression class="java.lang.String">$F{runtime}</textFieldExpression>
</textField>
</band>
</detail>
</jasperReport>

it's empty, even though viewing the data sink itself shows it contains data

by empty I mean the report compiles fine, but shows nothing; so why is the report empty when the datasink contains values?
gsugunan
soapui pro users
soapui pro users
 
Posts: 17
Joined: 16 Jun 2011 20:01

Re: empty result from a datasink

Postby SmartBear Support » 04 Jan 2012 11:58

Hi!

hmm.. is the name of the DataSink TestStep in your TestCase exactly"DataSinksSubReport" ?

/Ole
SmartBear Software
SmartBear Support
Administrator
Administrator
 
Posts: 6702
Joined: 16 Feb 2009 10:53

Re: empty result from a datasink

Postby gsugunan » 04 Jan 2012 15:28

that's the really weird part, I called it DataSink, but the subreport menu, when showing available data sources only shows DataSinksSubReport; if I use DataSink it just gives an error because DataSink doesn't exist (parameter not found error)
gsugunan
soapui pro users
soapui pro users
 
Posts: 17
Joined: 16 Jun 2011 20:01

Re: empty result from a datasink

Postby gsugunan » 18 Jan 2012 16:39

any chance of an update on this?
gsugunan
soapui pro users
soapui pro users
 
Posts: 17
Joined: 16 Jun 2011 20:01


Return to soapUI Pro Support