Friday, March 9, 2012

Primary Entity Switching Behavior in Report Builder

Is there any way to change the behavior where a new primary entity (the
entity at the top of the entities box) is automatically selected when you add
data that traverses a role with a 1-to-many relationship?
Let me illustrate using a generic example. Say the Customer table is the
main primary entity for my Report Builder. Customers can have 0 or multiple
orders, so the Role between the Customer-Orders table (the Cardinality) is
set to OptionalMany. When a user selects some Customer data then selects some
Order data, the Order entity appears at the top of the list automatically.
The report looks ok at first, but customers without orders will not show up.
What happened is that SQL code behind the report is like:
SELECT FROM Orders INNER JOIN Customer
when what I really want is:
SELECT FROM Customer LEFT OUTER JOIN Orders
I think the Report builder is trying to be helpful by doing this, but is
there anyway to get it to stop this automatic behavior or reverse it after it
has happened? Deleting all of the chosen data on your report seems to be the
only way to get the entities list back to normal, but that is obviously not
helpful.bump
Is that a no?
"Max Reiner" wrote:
> Is there any way to change the behavior where a new primary entity (the
> entity at the top of the entities box) is automatically selected when you add
> data that traverses a role with a 1-to-many relationship?
> Let me illustrate using a generic example. Say the Customer table is the
> main primary entity for my Report Builder. Customers can have 0 or multiple
> orders, so the Role between the Customer-Orders table (the Cardinality) is
> set to OptionalMany. When a user selects some Customer data then selects some
> Order data, the Order entity appears at the top of the list automatically.
> The report looks ok at first, but customers without orders will not show up.
> What happened is that SQL code behind the report is like:
> SELECT FROM Orders INNER JOIN Customer
> when what I really want is:
> SELECT FROM Customer LEFT OUTER JOIN Orders
> I think the Report builder is trying to be helpful by doing this, but is
> there anyway to get it to stop this automatic behavior or reverse it after it
> has happened? Deleting all of the chosen data on your report seems to be the
> only way to get the entities list back to normal, but that is obviously not
> helpful.

No comments:

Post a Comment