Hi all,
This is a bit tricky question.
I have a table has a Client_id and Client Information.
Some time Client can act as Vendors.
Example:
I may have a client :ABC
But i need to add its vendor :XYZ which may picking from same table.
Problem:
I have Client information as my Master Section and I need to get the Vendor Information as a Sub Section.
But i cannot Do it.'coz Master Client Name is not allways the Vendors.
Let me take the same Example:
I may have a client :ABC as Master Section Name (using Client_ID)
But i need to add its vendor :XYZ Sub-Section Name (Client_ID)which may picking from same table.
The Mater Client Name is Repeating.
Please Help me with this problem
Hi
Thanx,
But even if i Add Alias the Client Id is the same and i will be getting the data’s for the same ID.i will be pulling the same coloum.
So if i use the Alias in the Sub Section then the Master Section will restrict the data.
Or if it is possible , please explain me in detail .
Here a Client plays two roles(Client and Vendor)… So basically what you gonna do is create a Alias of Client for Vendor and then create the Vendor object from that Aliased Table… Now create a report with Client and Vendor and then do the Master Detail as you need… If you have a dimension which plays two different roles then it is a potential candidate for Alias…
How are Clients and Vendors related? Is it via something like an agreement?
If so a client will have an agreement and an agreement will have a vendor? or something similar…
Client (Client) = Agreement
and
Agreement = Client (Vendor)
When you create the alias you create a new class called Vendor details and depending on how you’ve defined the joins (through your link table or whatever) you should be able to add this to your query ok.
Give a little more info about your data structure please so we can help you better
EDIT: Thanks Sri I can DO it, I just can’t TELL it very well… You hit nail on head as ever.
But, the No of Clients beiing pulled is actually restricted by a condition in the report.
Clients are pulled only for those transactions where the location of the client is US.
whereas the vendors for any of the clients need not necessarily be from US but anywhere in the world.
When you create the alias you’re creating a copy of the table which you can query independantly of each other. So you’ll have 2 tables in the universe, one called Clients, the other one Vendors. Both will contain exactly the same data.
If you then create a new class of objects called Vendors you can query on each part independantly.
So if you impose a condition on the Clients.location that restricts to locations in US, if you had Vendors.location in the result objects this would return Vendors.location from any location unless you specified that Vendors.location was also = US
We have a Person table which holds everybody’s name, age, etc and holds both clients and employees. We have multiple aliases of this which we can query independantly. This can also be achieved with contexts but our universes are not built that way.