<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta name=Generator content="Microsoft Word 12 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"Segoe UI";
        panose-1:2 11 5 2 4 2 4 2 2 3;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Texte de bulles Car";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.emailstyle17
        {mso-style-name:emailstyle17;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.TextedebullesCar
        {mso-style-name:"Texte de bulles Car";
        mso-style-priority:99;
        mso-style-link:"Texte de bulles";
        font-family:"Tahoma","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=FR link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Hi Lene,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>have you tried the "<b>toint"</b> and "<b>tostring"</b> function ?<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>This formula is to retrieve $area in square km with 2 decimal digit, but I guess, you will adapt it for you :<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>tostring(toint($area/10000.0)/100.0) || ' km²'<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Be warned that the "<b>toint</b>" make a round operation.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Regards.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><div><p class=MsoNormal><span style='font-size:9.0pt;font-family:"Segoe UI","sans-serif";color:#0B0B97'>Mathieu LATTES<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:9.0pt;font-family:"Segoe UI","sans-serif";color:#0B0B97'>Directeur Technique<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:9.0pt;font-family:"Segoe UI","sans-serif";color:#365F91'><a href="mailto:m.lattes@interatlas.fr">m.lattes@interatlas.fr</a><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:9.0pt;font-family:"Segoe UI","sans-serif";color:#365F91'><a href="http://www.interatlas.fr/">http://www.interatlas.fr</a><br><a href="http://www.urbimap.com/">http://www.urbimap.com</a><o:p></o:p></span></p></div><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>De :</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> qgis-user-bounces@lists.osgeo.org [mailto:qgis-user-bounces@lists.osgeo.org] <b>De la part de</b> Lene Fischer<br><b>Envoyé :</b> jeudi 8 août 2013 05:09<br><b>À :</b> qgis-user@lists.osgeo.org<br><b>Objet :</b> [Qgis-user] Label using $area and decimals<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><div><div><div><div><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black'>Hello <o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black'>In Master I´m trying to set a label with the function $area. This works fine.<o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black'>But I´m trying to use the formatting for numbers with only 1 decimal -  no succes. <o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black'>It works fine if I use a coloumn containing the area.<o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black'>But this is not a solution because the $area is not dynamic in the coloum of the attribut table.<o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black'>Secondly - how do I activate the functions in the Labeltoolbar -ex Move or Show/Hide<o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black'>Regards<o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black'>Lene Fischer<o:p></o:p></span></p></div></div></div></div><p class=MsoNormal><span lang=EN-US style='font-size:12.0pt;font-family:"Times New Roman","serif"'><br clear=all><o:p></o:p></span></p></div></body></html>