Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I'm testing tJasperReportExec component and encounter some difficulties.
I know this is a custom component made by Jan Lolling but i put my question here for others reference.
First of all i tell you what i have done so far :
In Report Studio :
I created the jrxml file using jasper report studio (6.3.0), (i configured Jasper report studio compatibility mode to respect Jan's documentation).
The datasource is a CSV file whith a schema as simple as cle;valeur
this input file contains such values :
key1;value1
key2;value2
etc...
The jasper report i create is also very simple : i put the cle and the valeur fields in the detail band of the report.
Testing the report using the preview tab is OK and lists each file entry.
In talend studio (TIS 6.1.1) :
i created a very simple job (CF screenshot) :
tFileInputDelimited ----> tAdvancedFileOutputXML
|
|
tJasperReportExec
the output of tAdvancedFileOutputXML is as follows :
<rootTag>
<loop>
<cle>Dossier_fichiers_entree</cle>
<valeur>C:/DSN/dsn_a_traiter</valeur>
</loop>
<loop>
<cle>Dossier_fichiers_sortie</cle>
<valeur>C:/DSN/dsn_sortie</valeur>
</loop>
<loop>
<cle>Dossier_logs</cle>
<valeur>C:/DSN/LOG</valeur>
</loop>
<loop>
<cle>repertoireTravail</cle>
<valeur>C:/DSN/temp</valeur>
</loop>
</rootTag>
So i have a XML file i want to use to create pdf file.
In the tJasperReportExec component i select XML file as the datasource and i uncheck "use select expression from report".
In his documentation, Jan writes :
XML file: Choose the input data xml file
Use select expression from report:
Select expression: in case of the option above if false: XPath expression to the loop
element
I put this XPath expression (the one to the loop element) : "/rootTag/loop" in the "Select expression" field
When i run my job, i get a PDF file of the good number of lines (number of loop elements in the XML file) but each field is filled with null value (CF PDF file).
I tested the same way with the "Use select expression from report" check box checked, but then i got one line with null values.
NB : the field names are the same in the XML file and in the jrxmlfile. I checked it.
I'm wondering what i have done wrong, coul it be the XML file tha is not compatible with the component ?
Thanks for your reading.