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