- Code: Select all
SELECT
tckopf."VONNAME" AS tckopf_VONNAME,
tckopf."ANNAME" AS tckopf_ANNAME,
tckopf."SCHIFF" AS tckopf_SCHIFF,
tckopf."VON" AS tckopf_VON,
tckopf."BIS" AS tckopf_BIS,
tckopf."TAGE" AS tckopf_TAGE,
tckopf."ID" AS tckopf_ID,
tckopf."PERIODE" AS tckopf_PERIODE,
tckopf."BEZAM" AS tckopf_BEZAM
FROM
"tckopf" tckopf
WHERE
tckopf."ANMAND"= $P{customerNo} AND tckopf."VONMAND"= $P{clientNo} $P!{withVessel}
withVessel is defined as java.lang.String with the following "Default Value Expression".:
- Code: Select all
$P{vesselNo} == null ? "" : " and tckopf.VESSEL_NR=' "+ $P{vesselNo} + " ' "
The parameter vesselNo is defined as java.lang.Integer and is used as prompt in iReport.
If I compile the report in iReport with and without a passed vesselNo, the report is showed as desired. But if I run the report from Servoy, it is only showed as desired if the vesselNo is not passed to the report. If I pass the vesselNo to the report, I get a message.:
The document has no pages
This is the code that calls the report.:
- Code: Select all
reportParams.clientNo = forms.boss_char_charterfaktura_base_dtl.vonmand;
reportParams.customerNo = forms.boss_char_charterfaktura_base_dtl.anmand;
if ( withVessel ) {
reportParams.vesselNo = forms.boss_char_charterfaktura_base_dtl.vessel_nr;
} else {
reportParams.vesselNo = null;
}
report = plugins.jasperPluginRMI.runReport( db.DATABASE.BOSS_DB, charterFakturaDocListReport, null, "view", reportParams, forms.boss_char_charterfaktura_base_dtl.getDocumentLanguage( ) );
- iReport version: 4.0.1
Servoy JasperReports Plugin version: 4.0.1
Why it does not work if I pass the vesselNo to the report from Servoy?