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 -> .NET

 how to set default to is not null

Print topic Send  topic

Author Message
Bruce Van Horn
Posted: 06/30/2004, 2:36 PM

in the parameter builder on a grid (the dialog box where you specify "is null" for a default if nothing is specified. What if you want to specify "is not null"?

I tried typing in "is not null" in the default parameter box but that doesn't work.
peterr


Posts: 5971
Posted: 06/30/2004, 7:26 PM

There are many cases when the visual way of setting up the Data Source may not be sufficient and then you can switch to SQL to have more control. In the case you described you can implement own "Not Null" functionality by changing the data source type from Table to SQL and then creating the appropriate WHERE statement.
For example I just tested this SQL based on our Internet sample database and it worked OK for me:
SELECT * FROM articles WHERE category_id = {s_category_id} OR ({s_category_id}=-1 AND category_id Is Not NULL)

(I setup "s_category_id" parameter with the default value of '-1'.)
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
Bruce Van Horn
Posted: 07/07/2004, 11:16 AM

{s_category_id}=-1? That's so stupid its brilliant :-)

Thanks!

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.