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 -> ASP

 Newbie Search/Grid Form Question

Print topic Send  topic

Author Message
03mach1

Posts: 5
Posted: 05/22/2008, 7:53 AM

I have been searching, frequenting the forums for a while, I can create all the forms, grids, search, edit, etc...getting familiar with the program...but....

Q: Is there a way to create a separate "Search page" without showing the data grid until the search criteria is met.? Basically, the Grid is either blank or not visible until a search word/phrase is entered and the Search Button pressed? Or launch a separate Grid Page passing the Search criteria to it.

Thanks all.

View profile  Send private message
wkempees


Posts: 1679
Posted: 05/22/2008, 8:14 AM

In Design Open the resulting Grid.
In the properties of the Grid, click the DataSource [...]
As you view the SQL in the VQB (Visual Query Builder) click the Where
In the Lower middle pane the Where parameters are shown, you can click any of those to see what they are made up off.

Click them and see that each right part of the construct has a Default value.
If you set for instance a Defautl of "-1" or any other impossible value, then your search will if blank default to an empty grid.
Hope this makes sense.

Walter

_________________
Origin: NL, T:GMT+1 (Forumtime +9)
CCS3/4.01.006 PhP, MySQL .Net/InMotion(Vista/XP, XAMPP)

if you liked this info PAYPAL me: http://donate.consultair.eu
View profile  Send private message
03mach1

Posts: 5
Posted: 05/22/2008, 8:43 AM

Thanks Walter!! :)

I figured out what you said, step by step.

I set all the Default values to "-1" in the grid.

The Grid is Blank when loading the page. "No Records" displayed" - which is what we wanted....

BUT, the search doesn't work, put in any value, the grid stays blank.?

Much Closer to what we want.

-Dave
View profile  Send private message
wkempees


Posts: 1679
Posted: 05/22/2008, 9:02 AM

AHA.... at least your grid is empty!
No just kidding.
Think about it for a minute and you'll solve it........

You did not tell me you had multiple search fields.
You have now defaulted them all to -1
So even if we fill one field the others will still be -1.
Is your search an AND or an OR search.........

Walter
_________________
Origin: NL, T:GMT+1 (Forumtime +9)
CCS3/4.01.006 PhP, MySQL .Net/InMotion(Vista/XP, XAMPP)

if you liked this info PAYPAL me: http://donate.consultair.eu
View profile  Send private message
03mach1

Posts: 5
Posted: 05/22/2008, 9:34 AM

Oops, sorry. :(

Yes, multiple search, all are -1.

I think they are AND,,,I bet I need to set them to 'OR'? So that if one is true, it works?
View profile  Send private message
03mach1

Posts: 5
Posted: 05/22/2008, 9:40 AM

Silly me.... :)

It works now!!

Thanks Walter. You get a Gold Star!

-Dave
View profile  Send private message
wkempees


Posts: 1679
Posted: 05/22/2008, 9:43 AM

You need to know what you want your search to do.....
AND or OR
After that you can find a way to implement above suggestion.....
It is not always -1 but it is a 'impossible' value......

You just play and see......

Walter
_________________
Origin: NL, T:GMT+1 (Forumtime +9)
CCS3/4.01.006 PhP, MySQL .Net/InMotion(Vista/XP, XAMPP)

if you liked this info PAYPAL me: http://donate.consultair.eu
View profile  Send private message
03mach1

Posts: 5
Posted: 05/22/2008, 9:58 AM

Just simple searching on the fields, it works great as-is for now.! :)

At least now I can figure out the rest of my project.

Thanks!

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

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.