CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 no duplicate values in grid form

Print topic Send  topic

Author Message
J.D.
Posted: 09/06/2002, 9:17 AM

I have a grid page that lists several vlans. If the vlan is on multiple pieces of equipment, then it is displayed twice. How do I limit the output to only show the vlan once?

Thanks,

J.D.
Provident Bank
TonyE
Posted: 09/06/2002, 10:43 AM

You need to use a custom querry

Modify the properties in your grid form as following.
Click in the title area of the grid
Change the Source Type to SQL
Click on the data source, so you can enter a custom querry

The most important part is the groub by statement. You would use GROUP BY vlans

Example querry that shows dublicate entries only once and also counts the dublicates. (It groups the item by customer)

SELECT rmas.item_id, c_name, COUNT(rmas.item_id) AS count
FROM rmas LEFT JOIN companies ON rmas.shipping_id = companies.company_id
WHERE rmas.item_id LIKE '{item_id}%'
Group by rmas.shipping_id
ORDER BY count DESC

Use a querry that reflects your own table. If you need to use a where clause you will also need to specify the parameters.

TonyE

   


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.