CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> General/Other

 Report: Count distinct

Print topic Send  topic

Author Message
spdaza

Posts: 17
Posted: 12/12/2006, 6:13 AM

Hi.

I have a report withs some count columns, is there a way to specify that may be a Count -distinct not just a count ??

Thanks
View profile  Send private message
mamboBROWN


Posts: 1713
Posted: 12/12/2006, 4:49 PM

spdaza
Could you show us your SQL statement?? That would be helpful.
View profile  Send private message
Sandra
Posted: 12/13/2006, 6:05 AM

The SQL in the wizard of the report is:

SELECT CONCAT(DAT1NUMBER,' - ',DAT1CON) AS DAT2LEGALNAME, DAT2s.DAT2SID AS DAT2s_DAT2SID, DAT2LEGALNAME AS USDA,
DAT3alias.DAT3ID AS DAT3alias_DAT3ID, DAT4ID, DAT1s.DAT1SID AS DAT1s_DAT1SID, PIECESQTY, (PIECESQTY*STEMS) AS STEMS,
BOXESQTY, COUNTRY, DAT3sinvoicedet.PRODUCTSID AS DAT3sinvoicedet_PRODUCTSID, DATEARRI, DATEDEP, DAT5.DAT2SID AS DAT5_DAT2SID,
DAT1CON, DAT1NUMBER
FROM (((((DAT5 INNER JOIN DAT1s ON
DAT5.DAT1SID = DAT1s.DAT1SID) INNER JOIN DAT3sinvoice ON
DAT3sinvoice.DAT5ID = DAT5.DAT5ID) INNER JOIN DAT2s ON
DAT5.DAT2SID = DAT2s.DAT2SID) INNER JOIN DAT3sinvoicedet ON
DAT3sinvoicedet.DAT3SINVOICEID = DAT3sinvoice.DAT3SINVOICEID) INNER JOIN DAT3alias ON
DAT3sinvoice.DAT3ALIASID = DAT3alias.DAT3ALIASID) INNER JOIN products ON
DAT3sinvoicedet.PRODUCTSID = products.PRODUCTSID
WHERE DAT2s.DAT2SID = {s_DAT5_DAT2SID}
AND DAT1s.DAT4ID = '{DAT4Id}'
AND DAT1CON = {s_DAT1CON}
AND DAT1NUMBER LIKE '%{s_DAT1NUMBER}%'
AND COUNTRY LIKE '%{s_COUNTRY}%'
AND DAT3sinvoicedet.PRODUCTSID = {s_PRODUCTSID}
AND DAT1s.DATEARRI <= '{s_DATEDEP}'
AND DAT1s.DATEARRI >= '{s_DATEARRI}'
ORDER BY DAT1NUMBER

But on it the counts doesn´t appear because that is part of the report of the CCS
mamboBROWN


Posts: 1713
Posted: 12/13/2006, 3:19 PM

Sandra
Which specific columns do you wish to have a count for?? Currently in your report how do you group the data??
View profile  Send private message
spdaza

Posts: 17
Posted: 12/13/2006, 5:01 PM

i have an img of the screen, can i send it to your email?, :-). I'm really worried because i have too many reports sharing the same problem.

Thanks
View profile  Send private message
mamboBROWN


Posts: 1713
Posted: 12/14/2006, 3:58 PM

spdaza
I have sent you a private message with my email information. I look forward to hearing from you.
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.