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

 Empty Grid before a search is made

Print topic Send  topic

Author Message
Wreckmaster

Posts: 48
Posted: 11/04/2012, 6:26 AM

This question has come up a number of times but the solution seems to be specific to the situation at hand and none suits mine.
Has anyone found a way to display an empty grid before a search is made.
I have an advanced search page with eight search parameters and two joined tables.
Dammed if I can figure this one out on my own.

Thank you.
View profile  Send private message
saseow

Posts: 744
Posted: 11/04/2012, 7:26 AM

Try adding a parameter to one of the search parameters that will always return no records in the calling URL of the page.
View profile  Send private message
bannedone


Posts: 273
Posted: 11/04/2012, 8:58 AM

When you say 'empty grid' , what exactly do you mean??

saseow's suggestion should work....
_________________
John Real
CodeCharge Studio Support, Training, Consulting, Development, Web based solutions
http://realsites.biz
http://ccselite.com
Other Banned IDs on this Forum. jjrjr1, jjrjr2
View profile  Send private message
Wreckmaster

Posts: 48
Posted: 11/04/2012, 9:27 AM

By empty grid I mean start with no records displayed until search is performed .
For saseow, I know of this method but it still leaves me with "No records" but I can live with that .

Thank you
View profile  Send private message
bannedone


Posts: 273
Posted: 11/04/2012, 9:32 AM

Remove the No Records text from the HTML

_________________
John Real
CodeCharge Studio Support, Training, Consulting, Development, Web based solutions
http://realsites.biz
http://ccselite.com
Other Banned IDs on this Forum. jjrjr1, jjrjr2
View profile  Send private message
Wreckmaster

Posts: 48
Posted: 11/04/2012, 9:43 AM

Quote bannedone:
Remove the No Records text from the HTML


But I need that for when no results are found :-)
View profile  Send private message
bannedone


Posts: 273
Posted: 11/04/2012, 9:45 AM

Well then try hiding the grid when no search parameters are present.
_________________
John Real
CodeCharge Studio Support, Training, Consulting, Development, Web based solutions
http://realsites.biz
http://ccselite.com
Other Banned IDs on this Forum. jjrjr1, jjrjr2
View profile  Send private message
Lucius

Posts: 220
Posted: 11/06/2012, 3:49 AM

Quote Wreckmaster:
Quote bannedone:
Remove the No Records text from the HTML


But I need that for when no results are found :-)

You can add your own custom message label instead, which will be displayed after search is performed and no records are found.


View profile  Send private message
MichaelMcDonald

Posts: 640
Posted: 11/07/2012, 12:31 AM

$gridInvoice->Visible = false;


if (CCGetFromGet("s_idorder") != NULL){
$gridInvoice->Visible = True;
}


_________________
Central Coast, NSW, Australia.

View profile  Send private message
Wreckmaster

Posts: 48
Posted: 11/07/2012, 9:34 AM

Quote Wreckmaster:
I have an advanced search page with eight search parameters and two joined tables.

Thanks Michael

I am aware of these (yours and saseow's) , I have eight search fields if the searcher fills seven fields and not "s_idorder" the grid will remain hidden , same if I give one field an impossible default value unless this field is used in the search nothing will return .

I have always settled for search and Grid on separate pages but would be nice to crack this one.

View profile  Send private message
bannedone


Posts: 273
Posted: 11/07/2012, 3:45 PM

Hi

There is nothing left here to crack...

Michael gave you the exact right answer.

Hmmmm... you have 8 search fields.... ever heard of the AND operator ( && )? (or the OR operator " || " depending on how you code the if statement)

You need him to write the entire code for you???

I am sure he will if you provide him the names of all your search parameters.....

8-)
_________________
John Real
CodeCharge Studio Support, Training, Consulting, Development, Web based solutions
http://realsites.biz
http://ccselite.com
Other Banned IDs on this Forum. jjrjr1, jjrjr2
View profile  Send private message
Wreckmaster

Posts: 48
Posted: 11/07/2012, 5:25 PM

:-) I'll be back
View profile  Send private message
Deddy

Posts: 2
Posted: 01/06/2013, 12:08 AM

You have big data in grid table, you have 8 parameter,
You want to display the data base on 8 parameter you set in search form. Before submit search form, no data display at the grid table.
On loading page, there is no parameter.
is it right?

So.. You need to setup Default parameter.

I do that with set "Use Default value if Parameter is Empty" in query builder on every parameter condition.
If parameter 1 use integer, You can use "0" in Default parameter.
if parameter 2 use text, just write "blahblah_no_one_have_this_parameter" in Default parameter.
and so on.

I hope this can help.

_________________
http://id-codecharge.blogspot.com
View profile  Send private message
MichaelMcDonald

Posts: 640
Posted: 01/06/2013, 6:44 AM

I dunno JR, I'm thinking about retiring from all this silly business :-D
_________________
Central Coast, NSW, Australia.

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.