none
Displaying only one records from list of results in a dataset RRS feed

  • Question

  • Hi

    I've written below query...

    SELECT DateStart, DateEnd,

    State,

    Group, Territory, Customer, Channel,Cluster,Banner,Grade,CallType,

    SUM(CASE WHEN DateStart IS NOT NULL THEN 1 ELSE 0 END) AS Called,

    SUM(CASE WHEN DateStart IS NULL THEN 1 ELSE 0 END) AS Not Called

    FROM Customer

    LeftJoin Card ON Customer.ID = Card.CustomerID

    -----

    ----

    WHERE DateStart = @Start and DateEnd = @End

    Group BY DateStart,DateEnd,State,Group,Territory,Customer,Channel,Cluster,Banner,Grade,CallType

    ORDER BY DateStart,DateEnd,State,Group,Territory,Customer,Channel,Cluster,Banner,Grade,CallType

    In Result Set, am getting result as below...

    DateStart   DateEnd          State    Group      Territory      Customer    Channel   Cluste    Banner   Grade   CallType

    29/7/2012   30/7/2012     AAA        A              AZX                XXX            122         544         121      4232      533

    30/7/2012   31/7/2012     AAA        A              AZX                XXX            122         544         121      4232      533

     

    I am using this as a dataset in SSRS report and using drill down approach to see the result.

    The issue is I want to see customer once. As in the above result we are getting the same customer twice. My aim for the report is to see whether the customer called or not. I do not want how many times customer called.

    How can I display the customer XXX only once. that means irrespective of how many times i get the customer but i have display only once.

    Please suggest. Thanks in advance.

    Monday, August 6, 2012 6:34 AM

Answers

All replies