Bug report #9142

"format_number" function error in label expression

Added by Marcin Sołoguba over 10 years ago. Updated almost 8 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Labelling
Affected QGIS version:2.0.1 Regression?:No
Operating System:Windows Easy fix?:No
Pull Request or Patch supplied:No Resolution:not reproducable
Crashes QGIS or corrupts data:No Copied to github as #:17777

Description

Function "format_number" in expression:
format_number(($area / 10000), 2) ||' '|| "gat"

generates bad labels. I see that in label preview (in Expression window) area is generated first as "0,00", but after simple change of expression is real value ex: "2,12". Finally in drawing there are only labels with zeroes (ex: 0,00 Db) or empty labels (in actual QGIS dev.)

05.png (237 KB) Richard Duivenvoorde, 2013-12-04 11:20 AM

Screen_Shot_2014-09-09_at_2.46.34_PM.png (173 KB) Diego Canales, 2014-09-09 11:50 AM

History

#1 Updated by Richard Duivenvoorde over 10 years ago

hi, can you maybe share some dataset for which this is happening?
can you maybe also try on another computer or OS?

Here it looks like current nightly is working fine (see screenshot)

#2 Updated by Paolo Cavallini about 10 years ago

  • Target version changed from Version 2.0.0 to Future Release - High Priority

#3 Updated by Richard Duivenvoorde almost 10 years ago

can someone confirm if this (still) is the case, as I could not confirm this?

otherwise this could be closed I think

#4 Updated by Giovanni Manghi almost 10 years ago

  • Resolution set to fixed/implemented
  • Status changed from Open to Closed

it seems fixed to me, please reopen if necessary.

#5 Updated by Diego Canales over 9 years ago

It still is problematic to me. It runs fine in the field calculator, also when I save it, but when I hit the toggle editing mode all the numbers switch to zeros (except for small numbers below 1,000). Can't figure out why is this.

Working on the Mac platform, version 2.4.0

#6 Updated by Richard Duivenvoorde over 9 years ago

can you please provide some test data, and the steps we have to do to see this problem?

#7 Updated by Nyall Dawson almost 8 years ago

  • Resolution changed from fixed/implemented to not reproducable
  • Status changed from Reopened to Closed

Closing due to lack of feedback

Also available in: Atom PDF