Quantcast
Viewing all articles
Browse latest Browse all 10045

How to build an inner joins on report model entities

We are using SSRS 2008 R2 with an Oracle data source. I have created a report model with 2 tables, Orders Table and Dates Table. For some reason, these 2 tables doesn't have any primary or unique constraints but the orders table has a bus_date column which relates to the bus_date column of the dates table. I have defined a logical key in the model entity using the order_id as the logical primary key of the orders table and date_category as the logical key of the dates table. Then created a relationship between the bus_date column. Generated the report model and deployed it to our report server

When I created a report using this model, dragging all the columns of both tables in the dataset, and ran the report. I was surprised to see that the report generated a left outer join on the orders table, it showed all the orders and null values on the fields from the dates table. I opened up the report log to check on the sql statement and it affirmed that the sql query generated was that of an outer join.

I was actually expecting the report model should do an inner join on both tables. Is this an expected behavior? how do we control the join being done by the report model, i.e. how do i create two model entities which are using an inner join, outer join, full outer join? Please shed some light on the behavior of report models. I don't find a lot of white papers or documents describing the behavior of SSRS report models


Viewing all articles
Browse latest Browse all 10045

Trending Articles