locked
how to avoid repeated records in rdlc report RRS feed

  • Question

  • User-102500655 posted

    hi,

    i an binding my report at run time with a store procedure...every thing is working fine

    i have to display some data and at the end name of approvers...initially only one approver was there so my store procedure was returning distinct record..now when i aad another approver then it will return two same records with the difference of approver name.

    now when report is populated it will load one record two time ...

    where my requirments are same only approver names shoud be change..

    my report look like something

     id name assetno

    1  laptop  234

    1 laptop 234

    approved by :NAME1

                       NAME2

    I to show this only once

    1  laptop  234

    1 laptop 234

    is there any property by setting which repeated values can be avoided??

    Friday, January 27, 2012 1:04 AM

All replies

  • User-1133898271 posted

    select distinct id from <tablename>

    Friday, January 27, 2012 3:25 AM
  • User-8475372 posted

    First, refine your query and build it in such a way that you are getting distinct records as suggested. 

    Second, if you are having lots of records, it is good to have search filters for reports. Implement filters by having input parameters to your query/stored procedure. 

     

    Friday, January 27, 2012 7:21 AM
  • User440347874 posted

    Always try to reduce the Number of rows to be pulled as less as possible. When I say the Less Rows, ensure we always need to have unRepeated Data.

    First thing is please try to refine the records in the DB Procedure itself.

    SELECT DISTINCT <<Cols>> from <<TableName>>

    Then if you want some GroupBy clause on a Certain Field which even that repeats like for Ex: if we look at your sample data above in that 1, Laptop, 234 and 1, Laptop,235 etc.. then You need to do a Grooup By of Laptop. So that should be a Group By Column such that you can see only "Laptop" Once for the collection of Records in the Report.

    Thanks

    Friday, January 27, 2012 8:59 AM
  • User-102500655 posted

    my dear ,

    i am alraedy selecting distinct ...the issue is due to different approver levels same detail is repeated with all approvers...

    as i have to show all approvers at the end of report and have to show detail seperatly...

    now issue is i dont want to reapeat same detail in detail table of report...

    distinct or group by has of no use for me here ...

    i found the way to hide duplicates but it leaves empty space there which is not recomended if any one know better solution. 

    Monday, January 30, 2012 6:36 AM
  • User-1133898271 posted

    if so then ur query is wrong .it must come for distinct .check the joins u made is correct 

    Monday, February 6, 2012 1:25 AM
  • User-102500655 posted

    not getting my point ...my query is returning me some thing like

    id assetname number approvername

    1   laptop      234       Ian

    1   laptop     234        mechal

    now these are distinct records aren't thaey?? but i have to siplay them sepratly in a single report

    so in that case my asset detail will be

    1 laptop 234

    1 laptop 234

    i am talking about this repeated information and want to show this one time not two times..

    Monday, February 6, 2012 5:02 AM
  • User-102500655 posted

    not getting my point ...my query is returning me some thing like

    id assetname number approvername

    1   laptop      234       Ian

    1   laptop     234        mechal

    now these are distinct records aren't they?? but i have to display them sepratly in a single report

    so in that case my asset detail will be

    1 laptop 234

    1 laptop 234

    i am talking about this repeated information and want to show this one time not two times..

    Monday, February 6, 2012 5:02 AM