PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → I have a lot of trouble with "Progress Bar control linked to an item"
I have a lot of trouble with "Progress Bar control linked to an item"
Débuté par Lars Mathiasen, 15 sep. 2014 15:21 - 4 réponses
Membre enregistré
4 messages
Posté le 15 septembre 2014 - 15:21
Hello. I'm all new to this forum, and to my brand new WX 19 pack. I must say I have been positive about using Windev.
But now I have a problem I hope someone will help me solve. I try to get a gauge (Progressbar) to work with a Query that only yelds one single value between 0 and 100. Integer.

The help page I was trying to use is:
http://doc.windev.com/…

But no matter how I twist it I simply can't get the gauge to show anything else than the initial values i manually or programmically feed it.

So my question is: How can I retrieve a value from a table/Query and feed it to a Prograssbar to show a value between 0 and 100.






I have tried to program it.
I have tried to link the progressbar via descritpion.
Nothing worked.

--
Regards
Lars Peder Mathiasen
www.evoluzionsys.dk
DENMARK
Posté le 15 septembre 2014 - 20:17
Hi Lars

If I understand correctly your question :
MyProgrssBar=Value
(with value being between min and max)


Perhaps if you show us your code, we'll be able to see what the problem is


Most of the time with beginners, it is NOT where you thing it is :-)

Best regards


--
Fabrice Harari
International WinDev, WebDev and WinDev mobile Consulting

NEW: WXShowroom.com is available: Show your projects!
More information on http://www.fabriceharari.com



On 9/15/2014 7:21 AM, Lars Mathiasen wrote:
Hello. I'm all new to this forum, and to my brand new WX 19 pack. I must
say I have been positive about using Windev.
But now I have a problem I hope someone will help me solve. I try to get
a gauge (Progressbar) to work with a Query that only yelds one single
value between 0 and 100. Integer.
The help page I was trying to use is:
http://doc.windev.com/…


But no matter how I twist it I simply can't get the gauge to show
anything else than the initial values i manually or programmically feed it.
So my question is: How can I retrieve a value from a table/Query and
feed it to a Prograssbar to show a value between 0 and 100.






I have tried to program it.
I have tried to link the progressbar via descritpion.
Nothing worked.

--
Regards
Lars Peder Mathiasen
www.evoluzionsys.dk
DENMARK
Membre enregistré
4 messages
Posté le 16 septembre 2014 - 08:33
Yes ofcause. And your right. It is a process learning.

Here is the case:
I have a percentage of deliverey reliability I want to show in a "speedometer" or a prograssbar on a scale from 1-100. So I made a database with the percentage reprecented by an integer number.









This gave a database of Unique dates with percentages.





I knew that a progressbar wanted one integer between min and max so I made a Query sorting out the last entered instance.




I now have one record shown.

http://hostimage.windev.io/images/2014-09-16_08-20-55_a33f5ba8b3484ef758380cd329187058.png4

First I tried to LINK the progressbar to the Query as shown in help, but that did not Work.
Second I tried to program it as below.

In the helpfile/tutorial i found how to feed the progressbar by using Myself() and:
<Name of Progress Bar Control> = <FileName>.<ItemName>


So I coded first the query:
PROGBAR_NoName1 = QRY_LevSikDayOne.PctLevSik


I've got this result:





So I coded the table instead - just to get some result:
PROGBAR_NoName1 = LeveringsSikDay.PctLevSik


Now I can test without errors but Theres no reading om the progressbar. And my meager knowledge of Wlanguage stops.

Here is the quote I build on:




It is from the online helpfile.

--
Regards
Lars Peder Mathiasen
www.evoluzionsys.dk
DENMARK
Posté le 16 septembre 2014 - 17:07
Hi Lars

the error message means that you have not EXECUTED the query before
trying to use it's result... Look at the hexecuteQuery help (and maybe
spend some time going through the tutorial, where all this basic stuff
is explained)

Best regards


--
Fabrice Harari
International WinDev, WebDev and WinDev mobile Consulting

NEW: WXShowroom.com is available: Show your projects!
More information on http://www.fabriceharari.com


On 9/16/2014 12:33 AM, Lars Mathiasen wrote:
Yes ofcause. And your right. It is a process learning.

Here is the case:
I have a percentage of deliverey reliability I want to show in a
"speedometer" or a prograssbar on a scale from 1-100. So I made a
database with the percentage reprecented by an integer number.









This gave a database of Unique dates with percentages.






I knew that a progressbar wanted one integer between min and max so I
made a Query sorting out the last entered instance.




I now have one record shown.
http://hostimage.windev.io/images/2014-09-16_08-20-55_a33f5ba8b3484ef758380cd329187058.png4


First I tried to LINK the progressbar to the Query as shown in help, but
that did not Work. Second I tried to program it as below.

In the helpfile/tutorial i found how to feed the progressbar by using
Myself() and:
<Name of Progress Bar Control> = <FileName>.<ItemName>


So I coded first the query:
PROGBAR_NoName1 = QRY_LevSikDayOne.PctLevSik


I've got this result:






So I coded the table instead - just to get some result:
PROGBAR_NoName1 = LeveringsSikDay.PctLevSik


Now I can test without errors but Theres no reading om the progressbar.
And my meager knowledge of Wlanguage stops.
Here is the quote I build on:





It is from the online helpfile.

--
Regards
Lars Peder Mathiasen
www.evoluzionsys.dk
DENMARK
Posté le 16 septembre 2014 - 19:05
Hi,
I think you need to start with simple tasks.

You try to read data from database, and show result in progress-bar . Result is not correct. And you read documentation about progres-bar.

Are you sure the problem is correctly identified ?

Step 1 : Read data from database, and show result with instruction info() or Trace() , or use debug-tools. Debug-tools are very efficient in Windev.

Step 2 : When you are sure that you read data correctly, try to show result in progress-bar.