1
I probably did not draw up a correct title, but I will try to explain my very detailed question.
I’m working with Windowsform at Visualbasic15
I need to make a form
where I get data from a tb
in a db
. But I don’t want to just pick up the dice and play in one DataGridView
. I would like this data to be formatted :
Ex:
This is the data saved in my db
.
Customers and Values.
+-----------+------+ | Cliente | Val1 | +-----------+------+ | 0000000-1 | 500 | | 0000000-2 | 650 | | 0000000-3 | 700 | | 0000000-2 | 320 | | 0000000-2 | 200 | | 0000000-3 | 580 | +-----------+------+
I would like to fetch all these dice, but playing in one DataGridView
as follows :
+-----------+------+ | Cliente | Val1 | +-----------+------+ | 0000000-1 | 500 | | 0000000-2 | 1170 | | 0000000-3 | 1280 | +-----------+------+
So that I can display the sums of all Val1
for the respective Customer and played the sum result within 1 Cell
C#
orVb.Net
? Do you have any code? if yes put what you have already done?– novic
@Virgilionovic I’m using C#. I don’t have code for this
form
still, I don’t really know where to start to make this execution.– Maurício Sanches
just make a
Select
withGroupBy
and show in Grid. These Values are in how many tables, and if you can enter the table name would be good– novic
@Virgilionovic Opa, Values are in only 1 table, call
tbVendas
where I concentrate all my sales reporting on acolumn
the Client and in anothercolumn
o Value of sale; eachrow
a sale.– Maurício Sanches