Click here to Skip to main content
15,888,113 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
NIK |Tanggal |Nama |Jabatan| Dept |Mulai | Sampai | SM |Selisih | Waktu |
2222|6/10/2015| akbar | eee | poo | 9:59AM|10:59AM |60mnt |0 mnt | 480mnt|
123 |6/10/2015| ahaha |wakwak | ssp |8:04 AM|11:04AM |180mnt |120mnt | 60mnt |
5555|6/10/2015| hhhh |oooo |LLLL |11:04AM|3:04 PM |240mnt |180mnt |300mnt |

that's my access data, i want to make a chart in vb 10, that showing frequency how often "Dept" appear in 5 days, what should i do ?? help me please
Posted
Comments
Ralf Meier 30-Jun-15 0:23am    
Could you show me, how does it should look like ?
The Entry "Dept" contains data like "poo" or "ssp". Do you want to use these "Names" as a kind of index and count them ?
Akbar Giffary 30-Jun-15 0:48am    
the entry "Dept" contains poo, ssp, lll, lll, lll
so the result in 5 days :
poo = 1
ssp = 1
lll = 3

and i want to show it on column chart

1 solution

I suggest the following :

1. Create a class (myClass), which represents the Entry :
Identifier as string
CountOfAppearance as integer
2. Create a List (of myClass) ' means the custom class from top 1
3. scan your source-data for all entries
by each entry compare, if it is still existing in your List.
- if Yes then increase the Count
- if No then create a new Entry with the Identifier-Name and the Count = 1
3a. you could combine the the function of top 3 in a customized collection, which does the needed function for you.
4. after this you have the Information to fill your Chart.
- I hope, you know how to handle a Chart ...

Could you solve the top's 1..3 by yourself or do you need further Information ?
Is top 3a interesting for you ?
 
Share this answer
 
Comments
Akbar Giffary 30-Jun-15 3:15am    
Thanks for suggest me, but sorry i can't understand how make it programmaticaly
Ralf Meier 30-Jun-15 3:33am    
Which part of it ?
I think, the creation of the ItemClass should be clear - isn't it ?
You never before worked with a List or a (customized) collection ...?
Akbar Giffary 30-Jun-15 4:10am    
i'm just new in here, so i still learn
yes, i never worked with a List or a (customized) collection before
can you guide me step by step ?
Ralf Meier 30-Jun-15 4:40am    
OK ... I would teach you ... but there is still a Little bit of work, which could be done by you BEFORE.

At first :
Create an ItemClass as descibed by me
Then :
Create a method which iterates through your DGV to find the different Identifier-Names
Then :
Improve your Thread with this Information

After this, we could do the next step(s) ...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900