Jasper subreports with tJasperReportExec component.

Five Stars

Jasper subreports with tJasperReportExec component.

Hello, 

 

I am using tJasperReportExec component to create PDF reports. I have two subreports within my main report which are getting referenced from a different folder location. When I run the report within JasperSoft Studio, it works fine by taking the path to subreports passed as parameters. But when I use the same set of parameters with tJasperReportExec component, it is getting ignored and throws an error saying unable to locate the .jrxml file within the same folder (where the main reports resides) instead of looking for the file in the location passed as parameter. Although the parameter variables are getting recognized, it seems the component is still looking for the subreport within the same folder as main report and not using the parameter supplied. Attached is a similar project structure to what I have where Rpt1.jrxml (main report) is making use of Rpt3.jrxml and Rpt4.jrxml as subreports.

 

jasper_proj.png

 

 

 

 

 

 

 

 

 

 

 

 

 

Is this some configuration I am missing or does this component require all the subreports to be within the folder where the main report is located?

 

Thanks


Accepted Solutions
Seventeen Stars

Re: Jasper subreports with tJasperReportExec component.

The problem is the component tries to compile the reports (main report and sub reports) and therefore it needs to know where the reports are located before the actual fill and export steps starts (and when the parameters are read).

I agree with you, it should be possible. I will add an option to prevent the compile check and accept the dynamic report location by the parameter.

At the moment, you have no chance, the path must be known at design time and not at runtime.


All Replies
Moderator

Re: Jasper subreports with tJasperReportExec component.

Hello,

tJasperReportExec is a custom component written by talend community user Jan Lolling and shared on talend exchange portal.

We don't have the source code of these components. It is the ownership of the person who built it. Feel free to contact the author.

Best regards

Sabrina

 

 

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Highlighted
Five Stars

Re: Jasper subreports with tJasperReportExec component.

Ok, thank you.
Seventeen Stars

Re: Jasper subreports with tJasperReportExec component.

The problem is the component tries to compile the reports (main report and sub reports) and therefore it needs to know where the reports are located before the actual fill and export steps starts (and when the parameters are read).

I agree with you, it should be possible. I will add an option to prevent the compile check and accept the dynamic report location by the parameter.

At the moment, you have no chance, the path must be known at design time and not at runtime.

Five Stars

Re: Jasper subreports with tJasperReportExec component.

Thank you Jan.