FORUMS PROFESSIONNELS
WINDEV
,
WEBDEV
et
WINDEV Mobile
Accueil
|
Messages récents
|
Connexion
|
Déconnexion
|
Français
Accueil
→
WINDEV Mobile 2024
→
To calculate a grand total in a table?
To calculate a grand total in a table?
Débuté par RobertLEO, 17 oct. 2019 08:26 - 6 réponses
Connectez-vous…
RobertLEO
#1
Membre enregistré
36 messages
Posté le 17 octobre 2019 - 08:26
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?
Signaler
0
0
Jim
#2
Posté le 17 octobre 2019 - 21:27
There is a SUM function, but it is for arrays.
Stuff your row into an array.
Signaler
0
0
RobertLEO
#3
Membre enregistré
36 messages
Posté le 18 octobre 2019 - 11:57
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)
Signaler
0
0
Jim
#4
Posté le 18 octobre 2019 - 18:25
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
Signaler
0
0
RobertLEO
#5
Membre enregistré
36 messages
Posté le 21 octobre 2019 - 05:17
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
Signaler
0
0
Jim
#6
Posté le 21 octobre 2019 - 16:09
Robert,
That will be a little harder.
I can't see an easy way of doing it by columns.
Jim
Signaler
0
0
Jim
#7
Posté le 21 octobre 2019 - 16:11
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
Signaler
1
0
→ Revenir à WINDEV Mobile 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (précédentes versions)
Français
English
Español
Portuguesa
Fermer cette fenêtre
Type de recherche
Uniquement les sujets
Tous les messages
Période de recherche
Date indifférente
Moins d'une heure
Moins de 24 heures
Moins d'une semaine
Moins d'un mois
Moins d'un an
Annuler
Aperçu de votre message
Ajouter une image
Importer une image depuis une URL
Envoyer une image depuis un fichier de votre disque
Déposez ici un fichier ou cliquez sur "Parcourir..."
ou
Annuler
0%
WLangage
SQL
XML, HTML
JAVA, Javascript
Texte