Solved

SSRS- repeatng rows

Posted on 2009-04-02
9
402 Views
Last Modified: 2012-05-06
I have just built my first report without using the SSRS report wizard.

I built my dataset using the following SQL:

SELECT     EmployeeKey, FirstName, LastName, MiddleName
FROM         DimEmployee

I placed a table on the Layout view and inserted a number of fields into the details section.

However the results which I get is repeating rows. Here is a screenshot  of my problem.
Is there a setting which I have missed.

I have followed the basic outline of the tutorial

http://msdn.microsoft.com/en-us/library/ms167559(SQL.90).aspx 

SSRS-Repeating-Rows.bmp
0
Comment
Question by:Mr_Shaw
  • 5
  • 3
9 Comments
 
LVL 9

Expert Comment

by:VikramMullick
ID: 24048386
It looks like  table DimEmployee has more columns than the 'EmployeeKey, FirstName, LastName, MiddleName'.
Hence your select query must be giving multiple rows.
If you wish to hide , duplicates , then for each textbox , go to properties
and there is a checkbox by the name hide duplicates. Tick it.
0
 

Author Comment

by:Mr_Shaw
ID: 24048473
the option to hide duplicated is greyed out.
0
 
LVL 16

Expert Comment

by:Auric1983
ID: 24049003
Mr.Shaw

one way to ensure you get unique rows for the report would be to modify your dataset to use the a query like the one below. I added the word "Distinct" that will give you a unique list so you shouldn't end up with duplicates.


select distinct EmployeeKey, FirstName, LastName, MiddleName
FROM         DimEmployee

Open in new window

0
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 

Author Comment

by:Mr_Shaw
ID: 24049476
still not working....
0
 
LVL 16

Accepted Solution

by:
Auric1983 earned 500 total points
ID: 24049490
Can you take a screenshot of your table in design mode?

Check the textboxes and see if you see something along the lines of this

=First(Fields!EmployeeKey.value)

0
 

Author Comment

by:Mr_Shaw
ID: 24049594
yes it was =First(Fields!FirstName.Value)

I changed it to =Fields!FirstName.Value and It worked...

It seems that =First(Fields!FirstName.Value) is the default when I dragged and dropped the field from the dataset...

Thanks for your help.
0
 

Author Closing Comment

by:Mr_Shaw
ID: 31565714
thanks
0
 
LVL 16

Expert Comment

by:Auric1983
ID: 24049609
If you create a table on the report you need to be aware that it creates a header/detail/ and footer row automatically.

You also need to assign the table to your dataset in the properties window prior to dragging in your fields. (If you don't it will use the "First" prefix)

0
 

Author Comment

by:Mr_Shaw
ID: 24049941
thanks for the tip.

do you think you could help me with my other question

http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SQL-Server-2005/Q_24288565.html
0

Featured Post

How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
MS SQL Server connect issues 4 37
SSIS GUID Variable 2 30
How come this XML node is not read? 3 26
SQL Get Store Procedure Column Name As Row 5 39
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Viewers will learn how the fundamental information of how to create a table.

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question