[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

SSRS- repeatng rows

Posted on 2009-04-02
9
Medium Priority
?
415 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

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

Accepted Solution

by:
Auric1983 earned 2000 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
One of the most important things in an application is the query performance. This article intends to give you good tips to improve the performance of your queries.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.
Suggested Courses

834 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