Ad Hoc View: cannot add multiple fields to the view?

Whenever I try to add multiple fields to the ad hoc view, I get the error: "JasperReports Server could not add items from different data islands." What does it mean and how do I resolve it?

 

rdpsinghvi's picture
Joined: Jun 15 2017 - 11:30pm
Last seen: 5 years 11 months ago

1 Answer:

This has to do with how the domain is set up. Adding fields to your domain doesn't help you unless those fields are somehow connected. So it's possible to create a domain by grabbing two different tables from your database.  Say Orders and Customers. But if you don't do anything more, those tables aren't connected in the domain, and when you get to the ad hoc view, you can't combine tables from disconnected  tables (hence "islands").  

So to get the fields into the same ad hoc view, you have to create a join between the tables inside the domain.  (Joins page).  Usually you do this on some kind of key field, like customer_id or something. It doesn't have to have the same name in the two tables, but it has to let you make an intelligent connection between them. So then you've built a bridge between the islands, and you can put fields from both tables in the domain.

elizam's picture
14458
Joined: Mar 5 2012 - 9:19am
Last seen: 2 years 10 months ago
Feedback
randomness