CodeCharge Studio
search Register Login  

Visual Web Reporting

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

YesSoftware Forums -> CodeCharge Studio -> PHP

 Hide Record Form

Print topic Send  topic

Author Message
datadoit.com
Posted: 05/11/2004, 7:40 PM

CCS2; PHP

How do I hide a record form? This doesn't work in the record form's
BeforeShow event:

global $form;

if ($form->ds->RecordsCount == 0) {
$form->Visible = False;
}

After doing some checks, it appears that the RecordsCount for the form
returns "0" every time. Pourquois?

I have no problems using this method with grids. This is a record form.


DonB
Posted: 05/11/2004, 8:22 PM

Mike,

Use num_rows() instead of RecordsCount. RecordsCount works with a grid by
executing a SELECT COUNT(*) FROM table (that is, whatever is in the CountSQL
property). It does not appear to be implemented for the Record form,
presumably because it's mainly used for calculating the pages with a
Navigator control in a Grid.

if ($form->ds->num_rows() == 0 {
$form->Visible = False;
}

--
DonB

http://www.gotodon.com/ccbth
SteveG

Posts: 56
Posted: 02/03/2005, 3:30 PM

Excellent tip, Don! Thanks a lot.
View profile  Send private message
Michael Mikkelsen
Posted: 03/23/2005, 12:48 PM

The Help file needs to be updated to refect this. There is an example in the help file (similar to the one given above) that does not work.

The Help Topic is: "ds->RecordsCount Run-Time Property (PHP)"


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.