Hi
I've a combbobox
(cbtables) which get its tables from sql server,
a datagridview
(dgvrecords) which displays the table records when selected and
and four checkboxes
(PN,CI,FI and RE) outside dvgrecords but rather in a groupbox. And maybe a Button (btnShow) to display the selected checkboxes.
If a checkbox is clicked, the clicked option and the relating columns shd be
SUM and displayed and if mutiples checkboxes are clicked it shd combine and display.
I dont know how to correctly realize the problem.
An example to demostrate my problem:
The combobox and the checkboxes:
PN = ProjectNr
CI = City
FI = FKZ
RE = Region
[ cbtables ]
[] PN
[] CI
[] FI
[] RE
The datagriview with some records:
ProjectNr Region FKZ City ABamount1 ABamount2 CFamount …..
A.1234 North LA Accra 4000 - 1500 ….
A.1234 North LA Accra 6000 2000 7000 ….
A.1234 North LI Accra 8000 3000 3100 ….
Z.9012 Central A Togo 6000 5000 250 ….
Z.9012 Central B Togo 2500 1000 8000 ….
B.5678 South LX London 6000 - 2700
Experted Solutions:
[x] PN
ProjectNr ABamount1 ABamount2 CFamount …..
A.1234 18000 5000 11600 ….
Z.9012 8500 6000 8250 ...
B.5678 6000 - 2700
[x] PN
[x] FI
ProjectNr FKZ ABamount1 ABamount2 CFamount …..
A.1234 LA 10000 2000 1500 ….
A.1234 LI 8000 3000 3100 ….
Z.9012 A 6000 5000 250 ….
Z.9012 B 2500 1000 8000 ….
B.5678 LX 6000 - 2700
[x] RE
[x] PN
[x] FI
ProjectNr Region FKZ City ABamount1 ABamount2 CFamount …..
A.1234 North LA Accra 10000 2000 1500 ….
A.1234 North LI Accra 8000 3000 3100 ….
Z.9012 Central A Togo 6000 5000 250 ….
Z.9012 Central B Togo 2500 1000 8000 ….
B.5678 South LX London 6000 - 2700
Is it possible. will appreciate your contributions