Distinct Count Total

Lets say I have 5 rows of data with the following numbers
1
2
3
3
4

I want to count the distinct numbers, so the total would be 4 NOT 5. How do I accomplish this?

Comments

  • edited 9:40AM
    BUMP! --> Does anyone answer anything on these forums or should I just give up and call Tech Support??
    Jon Poole wrote: »
    Lets say I have 5 rows of data with the following numbers
    1
    2
    3
    3
    4

    I want to count the distinct numbers, so the total would be 4 NOT 5. How do I accomplish this?
  • edited 9:40AM
    Jon Poole wrote: »
    BUMP! --> Does anyone answer anything on these forums or should I just give up and call Tech Support??
    Jon Poole wrote: »
    Lets say I have 5 rows of data with the following numbers
    1
    2
    3
    3
    4

    I want to count the distinct numbers, so the total would be 4 NOT 5. How do I accomplish this?

    I seriously need to know how to do this, any help!!!
  • edited 9:40AM
    Hi,

    can you give us a little more information on how you retrieve the data? Are you using the RegisterData function with a datatable? Or will the report be directly generated in fastreport?

    Best Regards,
    Keeper
  • edited 9:40AM
    Hi again,

    see attached file for an example. This is done using FR only. Just an idea, hope you get the idea.

    Best Regards,
    Keeper
  • edited 9:40AM
    So that is pretty much how I ended up doing it. I was hoping for something a little more like Crystal Reports where I could do it in the sum function.

    I think that the sum function should include such a function in the future.

    Also my data is gathered in the FRX via a MS-SQL statement not pushed into the report.
  • edited 9:40AM
    Hi,

    sorry, wasn't clear to me, that you already solved it und were just looking for a nicer option. In this case I would suggest opening a ticket and requesting a distinct-count function to fastreport.

    Best Regards,
    Keeper

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.