GRUPOS DE DISCUSSÃO PROFISSIONAL
WINDEV
,
WEBDEV
e
WINDEV Mobile
Inicio
|
Mensagens recentes
|
Conecte-se...
|
Disconnect
|
Português
Inicio
→
WINDEV Mobile 2024
→
To calculate a grand total in a table?
To calculate a grand total in a table?
Iniciado por RobertLEO, out., 17 2019 8:26 AM - 6 respostas
Conecte-se…
RobertLEO
#1
Membro registado
36 mensagems
Publicado em outubro, 17 2019 - 8:26 AM
Hello, I need your help, I have a table with numeric values across the columns and I need to create a row that sums up the grand total like how an excel's SUM(Columnstart:Columnend) would, is this possible in Windev Mobile for Android and iOS, and how to do this?
Denunciar
0
0
Jim
#2
Publicado em outubro, 17 2019 - 9:27 PM
There is a SUM function, but it is for arrays.
Stuff your row into an array.
Denunciar
0
0
RobertLEO
#3
Membro registado
36 mensagems
Publicado em outubro, 18 2019 - 11:57 AM
Jim wrote:
There is a SUM function, but it is for arrays.
Stuff your row into an array.
would this method be applicable if the table rows are not fixed? (as in there will be a lot of entries and more will be added as the usage goes on)
Denunciar
0
0
Jim
#4
Publicado em outubro, 18 2019 - 6:25 PM
It is doable, you just have to make sure your array matches the table row(s) all the time.
Then recalculate anytime there is a change.
Jim
Denunciar
0
0
RobertLEO
#5
Membro registado
36 mensagems
Publicado em outubro, 21 2019 - 5:17 AM
Jim wrote:
It is doable, you just have to make sure your array matches the table row(s) all the time.
Then recalculate anytime there is a change.
Jim
sweet, is this doable with columns instead as the sequence of numbers are on the columns B and beyond, while A is for what the row is for
Denunciar
0
0
Jim
#6
Publicado em outubro, 21 2019 - 4:09 PM
Robert,
That will be a little harder.
I can't see an easy way of doing it by columns.
Jim
Denunciar
0
0
Jim
#7
Publicado em outubro, 21 2019 - 4:11 PM
The following code was adding the rows.
temparray is array of int
ResRandom is int
ResRandom2 is int
ResRandom3 is int
TableDeleteAll(Table1)
ArrayDeleteAll(temparray)
ResRandom = Random(33)
ResRandom2 = Random(25)
ResRandom3 = Random(100)
TableAddLine(Table1,ResRandom,ResRandom2,ResRandom3)
AddLine(temparray,ResRandom)
AddLine(temparray,ResRandom2)
AddLine(temparray,ResRandom3)
Table1.Sum = Sum(temparray)
Jim
Denunciar
1
0
→ Voltar para WINDEV Mobile 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (versões anteriores)
Français
English
Español
Portuguesa
Fermer cette fenêtre
Tipo de Pesquisa
Apenas tópicos
Todas as mensagens
Período de pesquisa
Qualquer momento
Última hora
Últimas 24 horas
Semana passada
Mês passado
Ano passado
Cancelar
Pré-visualização da sua mensagem
Adicionar imagem
Importar uma imagem de uma URL
Enviar uma imagem a partir do seu disco
Deixe um ficheiro ou clique em "Procurar ..."
ou
Cancelar
0%
WLanguage
SQL
XML, HTML
JAVA, Javascript
Texto