[#14281] - Same report with multiple XML DataAdapters

Jaspersoft Community 'Read-Only' as of July 8, 2022

Transition to New TIBCO Community Just Weeks Away

You can still search, review wiki content, and review discussions in read-only mode. Please email community@tibco.com with questions or issues requiring TIBCO review or response.

Category:
Bug report
Priority:
Urgent
Status:
New
Project: Severity:
Critical
Resolution:
Open
Component: Reproducibility:
N/A
Assigned to:

Hi Team,

We have authored jasper report with multiple XML dataadapters.
Report is compiling & working, but we are getting data of main report's "defaultdataadapter" in both tables.
Below is our use case:

Table 1 -> Dataset-ChangeRequest -> DataAdaper1 (dataAdapterChangeRequest)
Table 2 -> Dataset-ChangeNotice -> DataAdaper2 (dataAdapterChanageNotice)

Can you please help us to understand, How can we get data of two dataadapters in two separate tables.
We have also tried by setting "net.sf.jasperreports.data.adapter", but it is always giving "Resource not found" exception.

PFA for JRXML & JRDAX.

Thanks & Regard,
Tushar Patil

tuspatil's picture
Joined: Jan 3 2022 - 10:54pm
Last seen: 2 days 13 hours ago

12 Comments:

#1

Hi Team,

Please help us on this. We are eagerly waiting for your reply.

#2

The solution is to set the net.sf.jasperreports.data.adapter property at subdataset level. If you get "Resource not found", please attach a self contained test case to reproduce the error.

Also, you don't need data source expressions for the table dataset runs if you have data adapters configured for the subdatasets.

Regards,
Lucian

#3

Hi Lucian,

I tried by setting "net.sf.jasperreports.data.adapter" property at subdataset level, but I am getting "Resource not found". PFA for latest JRXML.
Can you please help me to understand, how to resolve "Resource not found" error. We are using 6.19.0 version.
What do you mean by self contained test case to reproduce the error.

We have urgent requirement for this. Your early response will be very helpful for us.

Thanks & Regards,
Tushar Patil

AttachmentSize
Binary Data samplereportwithtwotables.jrxml7.28 KB
#4

Hi Lucian,

Please help us on this. We are eagerly waiting for your reply.

#5

Hi Lucian,

PFA for self contained testcase to reproduce "Resource Not Found" error. After executing attached report we are getting exception as below:
net.sf.jasperreports.engine.JRRuntimeException: net.sf.jasperreports.engine.JRException: Resource not found at: /DataAdapterNotice.jrdax.

Please check the same & let us know if attched JRXML is correct to multiple table with multiple dataadapter use case.

Thanks.

#6

The only problem that I see with the report is that it still has data source expressions for the table dataset runs. The table subdatasets should not be passed data sources since they have data adapters that are meant to provide data.

Once I remove the data source expressions from the table dataset runs, the report works fine for me, see the output that I get. If you're still getting Resource not found errors please describe how exactly you run the report (Jaspersoft Studio, your own application, etc) and what are the locations where all the resources are placed.

Regards,
Lucian

AttachmentSize
PDF icon multitablereport1656049695615.pdf1.71 KB
#7

Hi Lucian,

Which version of Jasper Studio you are using?

I am using Jasper Studio 6.19.0(Community Edition) to execute the report. Report(JRXML) & DataAdapter(JRDAX) are at same location in "My Reports" folder.
I had also tried by removing data source expressions for the table dataset runs, but still I was getting "Resource Not Found" error for "net.sf.jasperreports.data.adapter".

As per my analysis, this is the problem with Jasper Studio 6.19.0, because I am getting perfect output in Japser Studio 6.12.0.
Pleaes suggest.

Thanks,
Tushar

#8

I didn't run the report in Studio, I directly used the JasperReports Library to run it.

If there's a problem in Studio I suggest moving this issue to that project in order for the Studio team to have a look.

#9

Moved the issue to the Studio project.

#10

Thanks Lucian.

Hi Studio Team,
Please suggest.

#11

Hi Team,

Please help us on this. We are eagerly waiting for your reply.

#12

Hi Team,

Please help us on this.

Feedback