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

 " CCS not counted" error in Retrieve number of records event

Print topic Send  topic

Author Message
NilovSerge

Posts: 16
Posted: 10/22/2006, 12:18 PM

hallo!
I have a grid on a form
I need a label with number of rows in the grid Made an event BeforeShow with an action number of records:

//request_week_schedule_Label1_BeforeShow @90-5BAE6658
function request_week_schedule_Label1_BeforeShow(& $sender)
{
$request_week_schedule_Label1_BeforeShow = true;
$Component = & $sender;
$Container = CCGetParentContainer($sender);
global $request_week_schedule; //Compatibility
//End request_week_schedule_Label1_BeforeShow


//Retrieve number of records @92-ABE656B4
$Component->SetValue($Container->DataSource->RecordsCount);
//End Retrieve number of records

//Close request_week_schedule_Label1_BeforeShow @90-447DF8A9
return $request_week_schedule_Label1_BeforeShow;
}
//End Close request_week_schedule_Label1_BeforeShow


And on the form I see not number of records but:
"CCS not counted"
What is the matter? Deleted and created the label several times: result the same.


_________________
With respect,
Nilov Serge.
View profile  Send private message
WKempees
Posted: 10/30/2006, 2:10 AM

Quote :
And on the form I see not number of records but:
"CCS not counted"
What is the matter? Deleted and created the label several times: result the
same.

Please post here the SQL that is driving the Grid.
If the SQL is 'complex' meaning using Joins, calulation will fail.
and you will have to create a s custom COUNT.

Walter


gaouzief2
Posted: 11/29/2006, 3:06 AM

how do you create a custom COUNT ?
telmiger

Posts: 61
Posted: 11/29/2006, 9:14 AM

I am not sure what database and environment you are using but the following worked for me.
I am using php/mysql

Close CCS

Open up the MYSQL.xml located in the folder ProgramFiles/CodeChargeStudio3/Components/Databases.

Change the following entry from False to True
supportSelectFromSelect="True"

Open up your project and regenerated the page with the Records count component.
It should work now with out any custom code.

This works with the newer MYSQL versions. On older once you might get a sql error when trying to view the page.

Hope this helps

Tony

View profile  Send private message
gaouzief2
Posted: 11/29/2006, 10:22 AM

thanks, that worked

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.