Friday, March 9, 2012

Missing rows when viewing data in Report Builder. What gives?

I am very confused. To simplify this, I have a report model with two tables named Unit and Unit_Type. I have created and published this model to our Report Server.

When I build an ad-hoc report against this model, I end up with 2 different scenarios.

The first scenario is as follows:

I select a single attribute from the entity "Unit_Number" and add it to my report. I run the report and the footer of the report displays 10576 rows. I then export the report to Excel and when I check the actual number of records, there are only 7652 rows. I have confirmed the correct number of records by writing a simple SQL query which also generates a result with 10576 rows.

The same results are achieved if I add the attribute "Type_Code" from the "Unit_Type" table IF the Type_Code is part of the "Unit" group. To be clear, if I first add an attribute from the Unit table and then add an attribute from the Unit_Type table, my report has a single group and both entities belong to that group. This format will never give me correct number of records.

One more important piece of info... I have validated that there are absolutely NO duplicate records in my result set. All 10575 rows are unique.

The second scenario is as follows:

Rather than first selecting from the Unit table, I select "Unit_Type" from the "Unit_Type" table and then I add the attribute "Unit_Number" from the Unit table. Report Builder creates 2 groups when I set up the report this way.

The result when I run this report is 10576 rows when I import my report using this scenario into Excel! This is correct!

Question

So, why does Report Builder generate an incorrect result set unless attributes from both entities are included in the report and the attributes are in seperate groups? This makes no sense to me and will be extremely difficult to explain to our users.

I would really appreciate any feedback on this.

Scott
Are you running Service Pack 1? We fixed a bug with the wrong number of rows in Report Builder.|||I have the same problem, the solution was not to use Report Builder because it give you wrong results , its not a question of service pack or version, if you have a tool that don't give correct result's can you tell your client, "sorry but you have order $100.000 of product that you have in stock call microsoft they will give your money back"

No comments:

Post a Comment