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

 Group by

Print topic Send  topic

Author Message
HZetzer
Posted: 02/04/2002, 11:06 AM

I would like to GROUP BY defined fields with a WHERE for a passed parameter. I do not wish for the passed parameter to be apart of the GROUP BY. Any help would be appriecated.
Nicole
Posted: 02/05/2002, 2:24 AM

Hello,
try the following approach:
create custom sql on SQL tab using any field values in WHERE clause and add necessary fields to GROUP BY clause. Never mind what values you use here. During design time custom sql is executed in order to select field names to be displayed on the form.
But while site works on the server the temporary values are to be replaced with real ones. To do it duplicate sql query in Open event, e.g.:
PHP
if (get_param("name") != "")
$sSQL = "select name, count(*) from table_name where name like '%". get_param("name")."%' group by name";



   


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

PHP Reports

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

Home   |    Search   |    Members   |    Register   |    Login


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