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

 search and grid form with custom SQL

Print topic Send  topic

Author Message
telmiger

Posts: 61
Posted: 05/17/2004, 11:12 AM

I created a grid and search form with the grid builder.
Everything works OK. If none of the search criteria is entered all records show up in the grid.

To add some more functionality I converted the datasource of the grid from table to SQL, but did not add any custom SQL

The problem that I encounter now is that no records show up if no search criteria is selected. (Some of the search criteria are of integer values.)

I belief the difference is that in the Where clause of the table design you do not have to enter any default values in the parameter source.

In the custom SQL you have to enter a default value if the parameter is an integer type.

Is there a workaround for this?

Tony Elmiger
View profile  Send private message
peterr


Posts: 5971
Posted: 05/17/2004, 12:16 PM

When using the Table datasource CCS has full control of the generated code and the program dynamically modifies the SQL based on the returned parameters. For example if no parameter is present then the whole WHERE statement can be removed.
However when you decide to use own SQL then CCS assumes that this is what you want to use and we cannot remove or modify your own WHERE clause. In such case you will need to create a WHERE clause that can handle every situation, including non-existent parameter values. It is true that some paramater defaults may be needed in such case as well.
See related topic at http://forums.codecharge.com/posts.php?post_id=27344
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.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.

MS Access to Web

Convert MS Access to Web.
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.