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 -> Java

 Navagator problem using GROUP BY in GRID [SOLVED]

Print topic Send  topic

Author Message
DALDEI

Posts: 12
Posted: 10/27/2009, 6:06 AM

For some reason the forum wouldnt let me reply to an existing post so I'm posting new for future reference.

If you add a GROUP BY expression to GRID it breaks them completely, not only are the navigation broken, but it shows "No Records" at the bottom (in CCS 4.3 atleast) even when there are rows.

I used the code posted and augmented it so that it works without having to know your SQL.
In Java, MySQL this works for me

Add a Before Execute Select Custom Code and add this



e.getCommand().setCountSql(
"SELECT COUNT(*) FROM (" + e.getCommand().getSql() + ") as t"
);

((Grid)e.getModel()).setCountNeeded(true);


---

Not sure at all why this isnt done by CCS itself .. .I have opened a defect and will see if they reply.

_________________
David Lee
CTO Nexstra, Inc
dlee@nexstra.com
View profile  Send private message
shev

Posts: 2
Posted: 11/09/2009, 3:14 AM

View profile  Send private message
shev

Posts: 2
Posted: 11/09/2009, 3:14 AM

You tried to configure it in VQB ?
View profile  Send private message
DALDEI

Posts: 12
Posted: 11/09/2009, 6:36 AM

Yes, Visual Query Builder fails miserably if I have a sum and group-by clause.
It produces good SQL for the query but NO sql for the record counting which completely screws up the grid form.

A reply by CC Support also concludes this is "a known issue".
_________________
David Lee
CTO Nexstra, Inc
dlee@nexstra.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.

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.