Jump to content
We've recently updated our Privacy Statement, available here ×

Is there any way to select fields from multiple domains?


christina.ting
Go to solution Solved by elizam,

Recommended Posts

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

thanks @elizam. I'm am such a noob at this so please forgive my dumb questions.

I watched a video on how to create domains and what I did was basically select matching fields between 2 different domains and then did a left outer join to connect the two domains that contains all the fields that I want. So for example if domain A had a field called "ID" and domain B had a field called "ID" I selected both these fields and connected them. This is so that I could get access to a field in domain A that is not currently in domain B.

However, I noticed that some people did not connect domains based on matching fields b/w tables, they just connected any field from table A and any field from Table b? 

Which way is the correct way? Am I doing this correctly? I watched this tutorial: http://community.jaspersoft.com/wiki/jasperreports-server-domains-video

 

Thanks so much!

Link to comment
Share on other sites

  • Solution

(I'm afraid I'm too lazy to watch videos, so I hope this is right.)

You can join tables in a database to put them in a domain in JRS.  So if you have five tables in your database, and there is a way to join them all up, you can put them all in the same domain and then use them in ad hoc.  (Databases don't normally have domains so I'm guessing you mean tables).

The fields don't have to have matching *names*, but they have to make sense to match on. For example, if I have LAST in one table, and SURNAME in another table, then I can still make a join, because that makes sense.  But if I have a table that has NAME and it means Last Name, and another table with NAME and it means First Name, then making that join doesn't make sense.  So you are looking for a field that between the two tables functions as some kind of key field, whether or not it has the same name.

If you have tables in your domain and you have set it up so they are not connected to each other in any way (for example, you have A joined to B, and C joined to D, but no other connections), you can't use the disconnected chunks (sometimes called islands) in the same ad hoc. (So you have to choose between A&B vs. C&D.)   But if there is a field that it makes sense to join on (so say, A has Last and D has Surname), you can go in the domain and modify and make the join and then you can get all of them into the same ad hoc view. 

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...