Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

tJasperReportExec with XML input file

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.
0683p000009MFY4.jpg0683p000009MFPs.jpg

Labels (2)
7 Replies
Anonymous
Not applicable
Author

Hi,
We have re-directed your issue of  tJasperReportExec custom component to the author  Jan Lolling.
Best regards
Sabrina
Anonymous
Not applicable
Author

In my tests it works well. Could you please provide the XML input file and the jrxml file - I would like to check it.
There are no compatibility problems for the XML file. The JasperLibrary use a standard xml parser and has no special requirements.
Anonymous
Not applicable
Author

Hi,
Thanks for your reply,

Here are the two files in req_files.zip

Regards
req_files.zip_20160725-0735.zip
Anonymous
Not applicable
Author

It looks like attachments are not possible here in the forum. Could you send them to my own email address: jan.lolling@gmail.com?
Anonymous
Not applicable
Author

Jan,
i did send the files to your Email adress.
Anonymous
Not applicable
Author

Hi Fred-FM: the good news it works well now and the problems can easily be fixed within your report! The component works well.
I have checked your jrxml file and found some problems in it.
1. I recommend to setup the loop xpath within the report and not within the data adapter. This way you can avoid configuration problems because you do not have to configure the loop path expression outside the report.
2. You have not read the fields with the Read Fields function of the Jasper Studio. It is a bit strange but the actual xml tag to read is not the field name, it is the description.
Here my data source configuration in your report:

0683p000009MFY9.png

... and here the result

0683p000009MFYE.png

... here the component configuration:

0683p000009MFYJ.png
Anonymous
Not applicable
Author

Hey Jan,
this way everything works.
Thanks a lot for your advices and congratulations for your work on this powerfull component.