CodeCharge Studio
search Register Login  

Web Reports

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

YesSoftware Forums -> CodeCharge Studio -> ASP

 EmpDir example

Print topic Send  topic

Author Message
bas
Posted: 10/04/2005, 8:28 AM

The employee example will do most of what I want... but
I need to modify it a bit.

How can I modify the empdir example so that I can produce of
departments and the number of employees within the department
When clicked on Sales - the user wants to see the 2 employess in Sales dept
then click on appropriate employee to display the full details.

ie.
Sales (2)
Admin(5)
Technical(4)
peterr


Posts: 5971
Posted: 10/04/2005, 11:27 AM

You would need to change the grid's Data Source to an SQL query that outputs the summarized information with the employee totals. I often create such queries in MS Access and copy the SQL into CCS. Or you can use an MS Access query direcly in CCS if you're using MS Access as your database.
Here is sample SQL for what you described:
SELECT departments.department_name, Sum(employees.emp_id) AS SumOfemp_id FROM departments INNER JOIN employees ON departments.department_id = employees.department_id GROUP BY departments.department_name

_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
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.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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