If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Crystal Reports > Counting distinct in Crystal Reports 2008

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-01-10, 14:09
mkasem mkasem is offline
Registered User
 
Join Date: Oct 2002
Location: Hartford, CT
Posts: 103
Counting distinct in Crystal Reports 2008

Hi,

I have this formula field:
WhilePrintingRecords;
Sum ({%SQL_COUNT_99245}, {%SQL_ORDER_DEFINE});

Sql expression field SQL_COUNT_99245) code is:
DECODE(TRIM("EMSUMMARY_VIEW"."ADJ_PROC_CODE"),'992 45',1,0)

The sql expression field SQL_ORDER_DEFINE code is:
trim(substr("PROVIDER"."PROVIDER_NAME",(instr("PRO VIDER"."PROVIDER_NAME",' ')+2),length("PROVIDER"."PROVIDER_NAME"))) ||' '|| substr("PROVIDER"."PROVIDER_NAME",1, instr("PROVIDER"."PROVIDER_NAME",' ')-1)

The SQL_ORDER_DEFINE is only reversing the last name first name positions.

My goal is to get the formula field above to count distinct. Is there a way to do that?

Thanks
__________________
Mo
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On