Solved

SSRS- repeatng rows

Posted on 2009-04-02
9
395 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
Comment Utility
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
Comment Utility
the option to hide duplicated is greyed out.
0
 
LVL 16

Expert Comment

by:Auric1983
Comment Utility
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
 

Author Comment

by:Mr_Shaw
Comment Utility
still not working....
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 16

Accepted Solution

by:
Auric1983 earned 500 total points
Comment Utility
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
Comment Utility
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
Comment Utility
thanks
0
 
LVL 16

Expert Comment

by:Auric1983
Comment Utility
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
Comment Utility
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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

771 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now