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 by month

Print topic Send  topic

Author Message
yana

Posts: 11
Posted: 07/10/2007, 1:01 AM

helo...

I have a search listbox which contain month from january to december.
it sound easy but until now, i still have problem on how to carry out the result of any activities in a month.
the database stored date in yyyy:mm:dd format.

any idea??

thanx in advance
View profile  Send private message
Wkempees
Posted: 07/10/2007, 4:34 AM

Your Searchlistbox is apparently in a searchform
It should therefore display it's value on the URL when you press Search.
Something like &s_month=2 for February (might even be for January).

If that is true, than the next step is to tell VQB how to filter the grid.
If the database date field is called mydate and the search form search
field is s_month, then:
In VQB Where prameters should read from left to right:

  
       Field          Condition     Parameter  
Name: Month(mydate)  equals(=)     s_month  
Type: Integer                      URL  
	  

Basically if you generate a Grid+Search (optionally + Form)
Make sure you select the mydate field in the Search part of the Builder.
After Builder finishes goto Search Form in Design mode rightclick the
mydate search field change to Listbox, in it's properties set to
ListOfValues, enter the monthnames, set type to Integer.

Then click the Grid on the DataRow in it's properties press the [...] on
DataSource which opens up VQB, the Where should already be filled with
mydate = s_mydate.
Type the Month( ) around mydate and (IMPORTANT) set type from Date to
Integer.
That's all there is to it.

Works, tested.
Walter

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.

Web Database

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.