-=-
.
.....
  
 
RSS
Direkomendasikan menggunakan brower Opera/Chrome/Firefox. Resolusi minimal 1024x768 | Powered by ____ |
 
  
 
Nikmati Delphi-ID dalam berbagai versi tampilan :
Basic View (LOW Bandwidth)
Default View (Full)
Mobile Edition
Main Menu
..:: onWebTools ::..
..:: onLastPosts ::..
goto Postjumlah komponen maksimal dalam sebuah project(6)
 by d4mnf1y32
 on 21.May at 12:16
goto Posttanya grayscale to biner dengan scanline(1)
 by luckynvic
 on 20.May at 20:44
goto Posttanya looping biner to matriks(1)
 by luckynvic
 on 20.May at 20:10
goto Postsql error:acces denied for user....(2)
 by nasbms
 on 19.May at 16:54
goto Postpemanggilan frame(4)
 by nasbms
 on 19.May at 16:14
goto Posttanya AvLock(0)
 by azuriza
 on 19.May at 11:24
goto PostGet TDBEdit Value Menggunakan LookUp Grid(10)
 by henry_sys
 on 18.May at 11:27
goto Postmenghitung record dalam perulangan(4)
 by idhiel
 on 16.May at 13:53
goto Posttanya ascii(4)
 by mas_kofa
 on 16.May at 12:11
goto PostRawPrint Untuk Delphi XE2(0)
 by adewijaya
 on 15.May at 22:34
goto Postdatabase error..(4)
 by idhiel
 on 15.May at 15:57
goto Postbekasi, pt arila putra mahkota(3)
 by mas_kofa
 on 15.May at 15:37
goto Postbagaimana cara membaca file *.doc dg delphi?(0)
 by ficky
 on 15.May at 06:14
goto Posttanya biner to matriks(13)
 by diandewi
 on 14.May at 20:30

..:: onLast Articles ::..
..:: New Download ::..
Pascal-id.Org
Feeds -  Popular -  Latest
RE: The Longue
8 months, 3 weeks ago
RE: belajar pascal
8 months, 3 weeks ago
RE: The Longue
8 months, 3 weeks ago
RE: belajar pascal
8 months, 3 weeks ago
RE: Perkenalan dan Absen
8 months, 3 weeks ago
RE: Alhamdulillah Buka Puasa Bersama
8 months, 4 weeks ago
RE: تَقَبَّلَ اللهُ مِنَّا وَمِنْكَ - Selamat Hari Raya Idul Fitri
8 months, 4 weeks ago
Lintas Situs
«
free web site stats and visitor tracking

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
the_cupuOffline
Location:
19 Post subject: filter tanggal bulan dengan combo box bulan plsss urgent...  PostPosted: 17/Nov/2009 18:42
onNewBie


Joined: 17-Nov-2009
Posts: 3

Status: Offline
Teman2 master aku punya trouble aku ga ngerti neh....
aq bwd combobox yang isinya dari bulan januari sampe desember tapi aku ga ngerti filter tabelnya. misal kalau user milih januari maka yang keluar di dbgrid dari tabel yang di filter hanya bulan januari saja yang muncul caranya gimana ya????

aku pake filter misal master.filter : 'gak ngerti perintah filternya....

aku masih newbie dapet kerjaan...
tapi udah mentok.....
udah cari keman2 ga da solusinya.........

thank's buat yang udah mau jawab..... Sad Sad
 
 View user's profile Send private message  
Reply with quote Back to top
sky47Offline
Location:
Post subject: RE: filter tanggal bulan dengan combo box bulan plsss urgent  PostPosted: 17/Nov/2009 19:34
onConfident


Joined: 30-Sep-2009
Posts: 29

Status: Offline
itu tergantung database yang dipakai kok bagaimana memfilter berdasar tanggal, bulan atau tahun kalo database berbasis mysql bisa pke fungsi extract klo database yang berbasis sql server bisa pke fungsi datepart...lebih jelasnya bisa ke link berikut http://www.w3schools.com/sql/sql_dates.asp klo nggak tau database masuk yang mana......ya dicoba aja satu satu .... kikikikikik misal klo mysql based berarti klo mau memfilter berdasar bulan
1. isi combobox dengan item
(baris kosong)
januari
februari
maret
....dst

2. statement sql ditambah
'and extract(month from field_tanggal) = ' + intToStr(combobox.itemIndex)

ctt : jika item combobox adalah
januari
februari
maret
....dst (tanpa diawali baris kosong )
maka statement sql nya berubah jadi
'and extract(month from field_tanggal) = ' + intToStr(combobox.itemIndex + 1)

kan itemindex di combobox diawali dari 0

semoga bisa membantu
 
 View user's profile Send private message Send e-mail  
Reply with quote Back to top
the_cupuOffline
Location:
Post subject: RE: filter tanggal bulan dengan combo box bulan plsss urgent  PostPosted: 25/Nov/2009 21:37
onNewBie


Joined: 17-Nov-2009
Posts: 3

Status: Offline
belum dapet kk tulung donk
 
 View user's profile Send private message  
Reply with quote Back to top
AndyK
Location: Bandung
Post subject: RE: filter tanggal bulan dengan combo box bulan plsss urgent  PostPosted: 26/Nov/2009 09:34
onUber-Skilled


Joined: 31-Jan-2008
Posts: 275
Location: Bandung
@the_cupu :

selain di filter di query table yang dimunculin di table itu

select * from table1 where bulan='''+combobox.text+'''

_________________
= too much DELPHI will not kill you =
 
 View user's profile Send private message Yahoo Messenger  
Reply with quote Back to top
ImanD
Location: BeDeGe
Post subject: RE: filter tanggal bulan dengan combo box bulan plsss urgent  PostPosted: 26/Nov/2009 09:59
onElite


Joined: 09-Oct-2005
Posts: 1313
Location: BeDeGe
      the_cupu wrote:
Teman2 master aku punya trouble aku ga ngerti neh....
aq bwd combobox yang isinya dari bulan januari sampe desember tapi aku ga ngerti filter tabelnya. misal kalau user milih januari maka yang keluar di dbgrid dari tabel yang di filter hanya bulan januari saja yang muncul caranya gimana ya????

aku pake filter misal master.filter : 'gak ngerti perintah filternya....

aku masih newbie dapet kerjaan...
tapi udah mentok.....
udah cari keman2 ga da solusinya.........

thank's buat yang udah mau jawab..... Sad Sad


field type bulannya apa?
jika string(nama bulannya)

TableName.Filter:=FieldName=NamaBulan;
TableName.Filtered:=True;

sample simple
=============
code : pascal
  1. TableName.Filter:='Bulan=' QuotedStr(ComboBox1.Text);
  2. TableName.Filtered:=True;
Parsed in 0.001 seconds, using GeSHi


jika type bulannya no urut bulan manfaatkan ComboBox1.ItemIndex

_________________

website: http://darusmanaiman.net/
e-mail:
darusmanaiman@programmer.net
programmer@darusmanaiman.net
 
 View user's profile Send private message Visit poster's website Yahoo Messenger  
Reply with quote Back to top
the_cupuOffline
Location:
Post subject: RE: filter tanggal bulan dengan combo box bulan plsss urgent  PostPosted: 29/Nov/2009 21:22
onNewBie


Joined: 17-Nov-2009
Posts: 3

Status: Offline
field tanggalnya itu date jadi cuman mm/dd/yyyy....

saya masih belum ketemu buat kasus ini masalahnya baru pertama kali buat filter per bulan biasanya per tanggal master2 delphi........

maskih ya udah jawab tapi ada jawaban lainnya???

ditunggu..............
 
 View user's profile Send private message  
Reply with quote Back to top
luckynvicOffline
Location: on Warnet, on Home, on STMIK DP, on any where
Post subject: RE: filter tanggal bulan dengan combo box bulan plsss urgent  PostPosted: 29/Nov/2009 22:58
onSkilled


Joined: 08-Mar-2007
Posts: 102
Location: on Warnet, on Home, on STMIK DP, on any where
Status: Offline
database nya apa??? trus strukturnya apa??
kalo fieldnya date, sy lebih suka filter lewat query. seperti yg sky47 beri contoh....
data dari field harus diambil bulannya dulu (fungsinya tergantung dari databasenya, baca manual databasenya tentang date function). kalo paradox fungsinya extract(), kalo mySQL fungsi month().

contoh mysql SQLnya menjadi:

SQL:='select * from nama_tabel where month(field_tgl)='+inttostr(combobox1.itemIndex+1);

_________________
ane bukan master, ane cuma coba menambah ilmu, sorry if i wrong ^_^
 
 View user's profile Send private message Visit poster's website Yahoo Messenger  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 12 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic





Powered by PNphpBB2 © 2003-2009 The Zafenio Team
Credits


| Register | Lost Password ? |