CodeCharge Studio
search Register Login  

Web Reporting

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

YesSoftware Forums -> CodeCharge Studio -> PHP

 Snippet translation ASP to PHP

Print topic Send  topic

Author Message
kmcook

Posts: 6
Posted: 11/02/2004, 9:43 PM

In ASP this in the Before Show Server gives me an empty grid untila search form is filled and submitted. That is, the grid is visible but empty..
It does as required, returning the 'No records yet selected" as the default message.

if (grdRecords.command.Where = "") then
grdRecords.command.Where = "1=2"
end if


....whereas, in learning PHP, I've tried this in the Before Show of the grid but still get a fully populated grid before any search occurs.
What's my fix please?
...
global $grdRecords;
if ($grdRecords->ds->Where == "") {
$grdRecords->ds->Where = "1=2" ;
}

...


TIA
Casey
View profile  Send private message
peterr


Posts: 5971
Posted: 11/02/2004, 9:48 PM

I don't know the solution in PHP but you shouldn't need any code for this. The solution is described here: http://support.yessoftware.com/kb_article.asp?article_id=65
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
mrachow


Posts: 509
Posted: 11/03/2004, 12:02 AM

An additional remark only.

I wonder that it even works under ASP because the event you have choosen should be too late.

The link peterr provided should be just your solution but the point is to choose event Before Execute Select.

Regards,
Michael
_________________
Best regards,
Michael
View profile  Send private message
Casey
Posted: 11/03/2004, 1:20 PM

Ahhh...

Code OK, wrong event. All working as required now.

Thanks peterr and Michael.

Casey.

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.