Why am I getting multiple duplicate rows of records on a SSRS Report?

  • I have created a report in SSRS (I am teaching myself) and the report works (sort of) but #1 I am getting many rows of duplicated records and #2 When I select a Start Date and End Date for my report, sometimes I get results and sometimes I don't. I think I have something configured incorrectly in A) grouping and/or B)how the data is being pulled. Can someone please help? I will be glad to post the code here but I would like to know what portion of the code you need first.

    I have attached a screen shot of my report here so you understand what it is I am doing. This report is supposed to pull the data in the columns based on the opening date of the case. From there on, here is how the fields should work:

    Style (case name) - only show once per line

    Last Name, First Name - names of the selected staff for the report coinciding with the staff role values

    Title - is only pulling on three selected values and if they are not present then it should show blank (nothing) along with the previous field

    Contact date - just pulls the value based on the expression in the next field (created by)

    Created By - if the value is equal to 4322 then the information in that field shows along with the contact date and the comments field. If it is NOT equal to 4322 then the contact date, created by, and comments fields should show blank (nothing) in those fields

    Thanks so much,

    Dawn

    "Cakes"

  • I would start by looking at the query that is preforming the select. I always use stored procedures so that I can easily troubleshoot the query without having to launch the report itself.

    A report will only show what the query gives it. That could be that the database is not designed correctly, or you may be using the incorrect type of Join.

    Start there and see what you see.

    Andrew SQLDBA

  • +1...Exactly... you may want to work on the data set as it is the source of duplicate records... If duplicates are there in source then report is mere medium to show them...

  • Help improves when you post scripts for table structures and some sample data, along with the select statement.

    Usually when you get multiple records, a join is missing.

  • Greg Edwards-268690 (2/14/2014)


    Help improves when you post scripts for table structures and some sample data, along with the select statement.

    Usually when you get multiple records, a join is missing.

    Or maybe a criteria in your where clause is missing.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • SQLRNNR (2/14/2014)


    Greg Edwards-268690 (2/14/2014)


    Help improves when you post scripts for table structures and some sample data, along with the select statement.

    Usually when you get multiple records, a join is missing.

    Or maybe a criteria in your where clause is missing.

    And the Crystal Ball shows.....

    Or maybe it's the Envelope. 😀

  • Greg Edwards-268690 (2/14/2014)


    SQLRNNR (2/14/2014)


    Greg Edwards-268690 (2/14/2014)


    Help improves when you post scripts for table structures and some sample data, along with the select statement.

    Usually when you get multiple records, a join is missing.

    Or maybe a criteria in your where clause is missing.

    And the Crystal Ball shows.....

    Or maybe it's the Envelope. 😀

    😀

    Oh great Swami

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply