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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Gadje
Contributor III
Contributor III

Iterate Data from csv file in Jasper report

Hi everybody,

i need to iterate data from csv file in a Jasper report but i only get one line and not all lines i should get.

That's my job structure :

0693p00000AatyFAAR.jpg

I tried to iterate data from file [1] in tMap [2] as sho below :

0693p00000AatzIAAR.jpg

I made join on "NOBON" [3] and i filtered "CODAR" [1] as show in expression [2].

But my output PDF is only withe one line [1] as show below :

0693p00000Aau5LAAR.jpg

I would like to get all the lines that concerne the voucher N° 562730 [2] but those of other Gestionnaires than "CD" [3], in place [1].

I dont know to iterate.

Thanks in advance.

Labels (2)
6 Replies
Anonymous
Not applicable

Hi

Can you share a screenshot of the basic settings of tJasperOutput component? You are iterating the input rows, if you set the fixed file name/stream, the output file will be override for each iteration. To include all lines, try to add a tUnite component before tJasperOutput.

 

Regards

Shong

Gadje
Contributor III
Contributor III
Author

Hi Shong and thanks for reply,

Here are my basics settings for tJasperOutput component :

0693p00000AayRfAAJ.jpgAnd here is my report structure :

0693p00000AayRpAAJ.jpgI tried to add tUnit instead of the tMap [2] on my first screenshot but it didn"t work.

I'll retry one more time.

 

Anonymous
Not applicable

from your screenshot, I see you define a dynamic file name, that means you will generate different report for each iteration.

What are you expected result? Only one file to contain all lines?

 

 

Gadje
Contributor III
Contributor III
Author

I generate one file for eache manager, for CD manager -> OpenWeb_CD.pdf, for CP manager -> OpenWeb_CP.pdf, ...

Instead one line at [1] on the third screenshot i need all the lines that concerne the voucher N° 562730 [2] and the other managers than "CD" [3] that are in the CSV file "allArtListIn"

 

Here is a sample of my csv file :

0693p00000AaySdAAJ.jpgIn this example i need to get all the lines of the voucher N° 562730 and that are not for CD manager, all the CP manager lines, not only one line.

 

Anonymous
Not applicable

Thanks for your detailed explanation, it is clear now. I am not sure the problem comes from the job design or the report jrxml design. Can you try to do the following testing:

1 Use tFixedFlowInput to generate to multiple lines and link it to tJasperOutput directly, check if the job generates the report with multiple lines.

2 Use tFileOutputDelimited instead of tJasperOutput to generate a text file, check if the job generates one file for each manager with multiple lines.

 

Regards

Shong

Gadje
Contributor III
Contributor III
Author

Ok i try to do what you said and i return you the results.