Results 1 to 2 of 2
  1. #1
    5 Star Lounger
    Join Date
    Jan 2005
    Posts
    614
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Find unique combo and count as 1 (SQL Server/CR9)

    Hi everyone!
    I am having dilemma

    My Data looks like this:

    Code Prod
    1001 AAA
    1001 AAA
    1001 AAA
    Total: 1
    2002 AAA
    Total: 1

    3003 AAA
    3003 AAA
    Total: 1

    GrTotal Prod: 3

    All these Totals is wishfull thinking. I wish I could do this like I drawn.
    What should have happened is - when combination of 2 fields is found - 1001 A count as 1 and ignore the rest of the same combinations.

    How can I do this? I wasn't sure in wich forum to post. I can use VB.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Find unique combo and count as 1 (SQL Server/CR9)

    You could use a SQL statement such as

    SELECT DISTINCT Code, Prod FROM ...

    I'm not familiar with Crystal Reports (I assume that that's what CR stands for), but I'm sure it offers a possibility to create group headers (bands?).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •